Skip to content

Commit 21b1987

Browse files
committed
Manual; Add chapter about cppcheck build dir. Formatting tweaks.
1 parent e60d79e commit 21b1987

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

man/manual.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,22 @@ The checks in Cppcheck are not perfect. There are bugs that should be found, tha
2424
## About static analysis
2525

2626
The kinds of bugs that you can find with static analysis are:
27-
* undefined behavior
28-
* using dangerous code patterns
29-
* coding style
27+
28+
- undefined behavior
29+
- using dangerous code patterns
30+
- coding style
3031

3132
There are many bugs that you can not find with static analysis. Static analysis tools do not have human knowledge about
3233
what your program is intended to do. If the output from your program is valid but unexpected then in most cases this is
3334
not detected by static analysis tools. For instance, if your small program writes "Helo" on the screen instead of "Hello"
3435
it is unlikely that any tool will complain about that.
3536

3637
Static analysis should be used as a complement in your quality assurance. It does not replace any of;
37-
* careful design
38-
* testing
39-
* dynamic analysis
40-
* fuzzing
38+
39+
- careful design
40+
- testing
41+
- dynamic analysis
42+
- fuzzing
4143

4244
# Getting started
4345

@@ -405,6 +407,17 @@ The available options are:
405407
- c++17: C++ code is C++17 compatible
406408
- c++20: C++ code is C++20 compatible (default)
407409

410+
# Cppcheck build dir
411+
412+
It's a good idea to use a Cppcheck build dir. On the command line use `--cppcheck-build-dir`. In
413+
the GUI, the build dir is configured in the project options.
414+
415+
Rechecking code will be much faster. Cppcheck does not analyse unchanged code. The old warnings are
416+
loaded from the build dir and reported again.
417+
418+
Whole program analysis does not work when multiple threads are used; unless you use a cppcheck
419+
build dir. For instance, the unusedFunction warnings require whole program analysis.
420+
408421
# Suppressions
409422

410423
If you want to filter out certain errors from being generated, then it is possible to suppress these.

0 commit comments

Comments
 (0)