Skip to content

Commit 945a067

Browse files
committed
Merge branch 'main' into improve-enable-all-docs
UPDATING
2 parents cb410cf + 99523e1 commit 945a067

48 files changed

Lines changed: 355 additions & 275 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/CI-unixish-docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ jobs:
116116
- name: Build test
117117
run: |
118118
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
119-
make -j$(nproc) testrunner HAVE_RULES=yes CXXOPTS="-w"
119+
make -j$(nproc) HAVE_RULES=yes CXXOPTS="-w" testrunner
120120
121121
- name: Run test
122122
run: |
123-
make -j$(nproc) check HAVE_RULES=yes
123+
make -j$(nproc) HAVE_RULES=yes check
124124
125125
# requires python3
126126
- name: Run extra tests

.github/workflows/CI-unixish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,11 +417,11 @@ jobs:
417417
- name: Build test
418418
run: |
419419
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
420-
make -j$(nproc) testrunner HAVE_RULES=yes
420+
make -j$(nproc) HAVE_RULES=yes testrunner
421421
422422
- name: Run test
423423
run: |
424-
make -j$(nproc) check HAVE_RULES=yes
424+
make -j$(nproc) HAVE_RULES=yes check
425425
426426
# requires "gnu-sed" installed on macos
427427
- name: Run extra tests
@@ -609,7 +609,7 @@ jobs:
609609
run: |
610610
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
611611
# compile with verification and ast matchers
612-
make -j$(nproc) -s CXXOPTS="-g -O2 -w" CPPOPTS="-DCHECK_INTERNAL -DHAVE_BOOST" MATCHCOMPILER=yes VERIFY=1
612+
make -j$(nproc) CXXOPTS="-g -O2 -w" CPPOPTS="-DCHECK_INTERNAL -DHAVE_BOOST" MATCHCOMPILER=yes VERIFY=1
613613
614614
- name: CMake
615615
run: |

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Compile instrumented
4444
run: |
4545
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
46-
make -j$(nproc) all CXXOPTS="-g -fprofile-arcs -ftest-coverage" HAVE_RULES=yes
46+
make -j$(nproc) CXXOPTS="-g -fprofile-arcs -ftest-coverage" HAVE_RULES=yes all
4747
4848
- name: Run instrumented tests
4949
run: |

.github/workflows/format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ jobs:
5050
5151
- name: Uncrustify check
5252
run: |
53-
~/uncrustify/uncrustify -c .uncrustify.cfg -l CPP --no-backup --replace */*.cpp */*.h
53+
UNCRUSTIFY=~/uncrustify/uncrustify ./runformat
5454
git diff
5555
git diff | diff - /dev/null &> /dev/null

.github/workflows/scriptcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: build cppcheck
4040
run: |
4141
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
42-
make -j$(nproc) -s CXXOPTS="-w"
42+
make -j$(nproc) CXXOPTS="-w"
4343
strip -s ./cppcheck
4444
4545
scriptcheck:

.github/workflows/selfcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
5757
# valgrind cannot handle DWARF 5 yet so force version 4
5858
# work around performance regression with -inline-deferral
59-
make -j$(nproc) -s CXXOPTS="-O2 -w -gdwarf-4" CPPOPTS="-DHAVE_BOOST -mllvm -inline-deferral" MATCHCOMPILER=yes
59+
make -j$(nproc) CXXOPTS="-O2 -w -gdwarf-4" CPPOPTS="-DHAVE_BOOST -mllvm -inline-deferral" MATCHCOMPILER=yes
6060
env:
6161
CC: clang-14
6262
CXX: clang++-14

.github/workflows/valgrind.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Build test
4747
run: |
4848
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
49-
CXXOPTS="-O1 -g -w" CPPOPTS="-DHAVE_BOOST" make -j$(nproc) testrunner HAVE_RULES=yes MATCHCOMPILER=yes
49+
make -j$(nproc) CXXOPTS="-O1 -g -w" CPPOPTS="-DHAVE_BOOST" HAVE_RULES=yes MATCHCOMPILER=yes testrunner
5050
5151
- name: Run valgrind
5252
run: |

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Note: Usually you can run the CI on your own fork to verify that it passes befor
3434

3535
Cppcheck is tracking its issues at https://trac.cppcheck.net.
3636

37+
The tickets are not really prioritized (except for non-synthetic crashing issues) but of most interest are the following types of tickets.
38+
3739
[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)
3840

3941
Since Cppcheck aims to be low on false positives, these kind of issues are obviously of the highest priority.
@@ -44,6 +46,18 @@ Changes might lead to fewer findings being reported. In very few cases this migh
4446

4547
[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)
4648

49+
Note: If you start working on ticket, please assign yourself or request to be.
50+
51+
## Source TODOs
52+
53+
There are also various source-level TODOs. These might be related to already tracked issues (even if not explicitly noted) but may also be just exist exploratively, have even been added overzealously or might even be outdated.
54+
55+
So if you start spending a lot of time on these, you might want to get into touch before proceeding further.
56+
57+
## simplecpp
58+
59+
At its core Cppcheck is relying on the `simplecpp` library which is a preprocessor implementation which was spun off into its [separate project](https://github.com/danmar/simplecpp) with its own [bug tracker](https://github.com/danmar/simplecpp/issues). This is also maintained by the Cppcheck developers and contributions to it are also welcome.
60+
4761
## Translations
4862

4963
We are also maintaining various translations for `cppcheck-gui`.

TUNING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,18 @@ So if you do not require the additional safety you might want to switch to the u
111111

112112
Note: For Windows binaries we currently do not provide the possibility of using processes so this does not apply.
113113

114+
### Disable Analyzing Of Unused Templated Functions
115+
116+
Currently all templated functions (either locally or in headers) will be analyzed regardless if they are instantiated or not. If you have template-heavy includes that might lead to unnecessary work and findings, and might slow down the analysis. This behavior can be disabled with `--no-check-unused-templates`.
117+
118+
Note: This might lead to "false negatives" in such functions if they are never instantiated. You should make sure that you have proper coverage of the affected functions in your code before enabling this.
119+
120+
### Limit Analysis Of Projects
121+
122+
If you specify a project all files will be analyzed by default. But in some cases you might only be interested in the results in a subset of those (e.g. in IDE integrations).
123+
124+
Using the `--file-filter=<pattern>` CLI option you can select files using a globbing syntax. Using `--file-filter=-` you can provide the filters directly on the CLI.
125+
114126
## Advanced Tuning
115127

116128
### Re-order The Files

democlient/democlient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class CppcheckExecutor : public ErrorLogger {
6666
, cppcheck(settings, supprs, *this, false, nullptr)
6767
{}
6868

69-
void run(const char code[]) {
70-
cppcheck.check(FileWithDetails("test.cpp", Standards::Language::CPP, 0), code);
69+
void run(const char* code) {
70+
cppcheck.checkBuffer(FileWithDetails("test.cpp", Standards::Language::CPP, 0), reinterpret_cast<const uint8_t*>(code), strlen(code));
7171
}
7272

7373
void reportOut(const std::string & /*outmsg*/, Color /*c*/) override {}

0 commit comments

Comments
 (0)