Skip to content

Commit 2e410fb

Browse files
committed
fixed #12826 - added a preliminary contribution guide [skip ci]
1 parent 3783374 commit 2e410fb

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

CONTRIBUTING.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing To Cppcheck
2+
3+
These are some guidelines *any* contributor should follow. They will help to make for better contributions which will most likely allow for them to be processed.
4+
5+
(TODO: move daca@home section here?)
6+
7+
## Code Changes
8+
9+
Code contributions are handled via GitHub pull requests: https://github.com/danmar/cppcheck/pulls.
10+
11+
If you file a pull request you might not get a reply immediately. We are a very small team and it might not fit in the current scope or time.
12+
13+
Any kind of contribution is welcome but we might reject it. In that case we usually provide an explanation for the reasons but everything is always open to discussion.
14+
15+
Also after you filed a pull request please be ready to reply to questions and feedback. If you just "dump and leave" it might lower the chances of your change being accepted. This also applies after it was successfully merged as it might cause issues which were not exposed by the CI.
16+
17+
Please be not discouraged if your change was rejected or if the review process might not have been as smooth as it could have been.
18+
19+
Each change should be accompanied with a unit (C++) or integration (Python) test to ensure that it doesn't regress with future changes. Negative tests (testing the opposite behavior) would be favorable but might not be required or might already exist depending on the change. Tests which introduce `TODO_ASSERT_` or `@pytest.mark.skip`/`@pytest.mark.xfail` should have tickets filed.
20+
21+
If the change is modifying existing behavior (i.e. adding a feature or fixing a bug) it should be accompanied by an issue in the tracker (if you do not have access we can assist with that). Depending on the change it might also warrant an entry in `releasenotes.txt`.
22+
23+
The CI is already doing a lot of work but there are certain parts it cannot ensure.
24+
25+
(TODO: mention test_pr.py)
26+
27+
The CI has an "always green" approach which means that failing tests are not allowed. Flakey tests might be acceptable depending on the frequency of their failures but they should be accompanied by ticket so they are being tracked. If you introducing a test which is expected to fail you should use the `TODO_*` macros (C++) or `@pytest.mark.xfail(strict=False)` annotations.
28+
29+
Note: Usually you can run the CI on your own fork to verify that is passes before even open an PR. Unfortunately some changes to avoid duplicated build in our CI disabled this.
30+
31+
### Targets
32+
33+
Cppcheck is tracking its issues at https://trac.cppcheck.net/.
34+
35+
[False Positives](https://trac.cppcheck.net/query?status=accepted&status=assigned&status=new&status=reopened&component=False+positive&col=id&col=summary&col=status&col=component&col=type&col=priority&col=milestone&order=priority)
36+
37+
Since Cppcheck aims to be low on false positives, these kind of issues are obviously of the highest priority.
38+
39+
[Detection Regressions](https://trac.cppcheck.net/query?status=accepted&status=assigned&status=new&status=reopened&keywords=~regression&component=Improve+check&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&order=priority)
40+
41+
Changes might lead to less findings being reported. In very few cases this might be intentional but we should not regress in what findings are being reported.
42+
43+
[Other Defects](https://trac.cppcheck.net/query?status=accepted&status=assigned&status=new&status=reopened&type=defect&component=!False+positive&col=id&col=summary&col=type&col=status&col=component&col=priority&col=milestone&order=priority)
44+
45+
## Translations
46+
47+
We are also maintaining various translations for `cppcheck-gui`.
48+
49+
Several of these are not complete or might be out-of-date so contributions are welcome. We will also accept additional languages but such contributions should be complete.
50+
51+
(TODO: provide more details)

0 commit comments

Comments
 (0)