1 | # How to contribute
|
2 |
|
3 | ## Main rules
|
4 |
|
5 | * Before you open a ticket or send a pull request, [search](https://github.com/codacy/node-codacy-coverage/issues) for previous discussions about the same feature or issue. Add any new details to earlier tickets if you find any.
|
6 |
|
7 | * If you're proposing a new feature, make sure you create an issue to let other contributors know what you will be working on.
|
8 |
|
9 | * Before sending a pull request make sure your code is tested.
|
10 |
|
11 | * Before sending a pull request for a feature, be sure to run tests with `npm run test`.
|
12 |
|
13 | * Use the same coding style as the rest of the codebase, most of the checks can be performed with `npm run lint`.
|
14 |
|
15 | * Use `git rebase` (not `git merge`) to sync your work from time to time with the master branch.
|
16 |
|
17 | * After creating your pull request make sure the build is passing on [CircleCI](https://circleci.com/gh/codacy/node-codacy-coverage) and that [Codacy](https://www.codacy.com/app/codacy/node-codacy-coverage) is also confident in the code quality.
|
18 |
|
19 | ## Commit Style
|
20 |
|
21 | Writing good commit logs is important. A commit log should describe what changed and why.
|
22 | Follow these guidelines when writing one:
|
23 |
|
24 | 1. The first line should be 50 characters or less and contain a short
|
25 | description of the change prefixed with the name of the changed
|
26 | subsystem (e.g. "net: add localAddress and localPort to Socket").
|
27 | 2. Keep the second line blank.
|
28 | 3. Wrap all other lines at 72 columns.
|
29 |
|
30 | A good commit log can look something like this:
|
31 |
|
32 | ```git-commit
|
33 | subsystem: explaining the commit in one line
|
34 |
|
35 | Body of commit message is a few lines of text, explaining things
|
36 | in more detail, possibly giving some background about the issue
|
37 | being fixed, etc. etc.
|
38 |
|
39 | The body of the commit message can be several paragraphs, and
|
40 | please do proper word-wrap and keep columns shorter than about
|
41 | 72 characters or so. That way `git log` will show things
|
42 | nicely even when it is indented.
|
43 | ```
|
44 |
|
45 | ### Developer's Certificate of Origin 1.0
|
46 |
|
47 | By making a contribution to this project, I certify that:
|
48 |
|
49 | * (a) The contribution was created in whole or in part by me and I
|
50 | have the right to submit it under the open source license indicated
|
51 | in the file; or
|
52 | * (b) The contribution is based upon previous work that, to the best
|
53 | of my knowledge, is covered under an appropriate open source license
|
54 | and I have the right under that license to submit that work with
|
55 | modifications, whether created in whole or in part by me, under the
|
56 | same open source license (unless I am permitted to submit under a
|
57 | different license), as indicated in the file; or
|
58 | * (c) The contribution was provided directly to me by some other
|
59 | person who certified (a), (b) or (c) and I have not modified it.
|