Skip to content

Commit 440fb87

Browse files
committed
Minor tweaks in manual to make text easier to read (according to ai)
1 parent ef2c326 commit 440fb87

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

man/manual.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ you have to type:
110110

111111
cppcheck src/ --file-filter=src/test*
112112

113-
Cppcheck first collects all files in src/ and will apply the filter after that. So the filter must start with the given
114-
start folder.
113+
Cppcheck first collects all files in the specified directory, then applies the filter. Therefore, the filter pattern
114+
must include the directory path you specified.
115115

116116
### Excluding a file or folder from checking
117117

@@ -138,8 +138,8 @@ By default Cppcheck uses an internal C/C++ parser. However there is an experimen
138138

139139
Install `clang`. Then use Cppcheck option `--clang`.
140140

141-
Technically, Cppcheck will execute `clang` with its `-ast-dump` option. The Clang output is then imported and converted into
142-
the normal Cppcheck format. And then normal Cppcheck analysis is performed on that.
141+
Cppcheck executes clang with the -ast-dump option, imports the output, converts it to Cppcheck's internal format, and then
142+
performs standard analysis.
143143

144144
You can also pass a custom Clang executable to the option by using for example `--clang=clang-10`. You can also pass it
145145
with a path. On Windows it will append the `.exe` extension unless you use a path.
@@ -179,9 +179,8 @@ be improved.
179179

180180
Cppcheck instantiates the templates in your code.
181181

182-
If your templates are recursive this can lead to slow analysis that uses a lot
183-
of memory. Cppcheck will write information messages when there are potential
184-
problems.
182+
If your templates are recursive, this can lead to slow analysis and high memory usage. Cppcheck will write information
183+
messages when there are potential problems.
185184

186185
Example code:
187186

@@ -238,7 +237,7 @@ Using a Cppcheck build folder is not mandatory but it is recommended.
238237

239238
Cppcheck save analyzer information in that folder.
240239

241-
The advantages are;
240+
The advantages are:
242241

243242
- It speeds up the analysis as it makes incremental analysis possible. Only changed files are analyzed when you recheck.
244243
- Whole program analysis also when multiple threads are used.
@@ -274,7 +273,7 @@ To ignore certain folders in the project you can use `-i`. This will skip the an
274273

275274
## CMake
276275

277-
Generate a compile database:
276+
Generate a compile database (a JSON file containing compilation commands for each source file):
278277

279278
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .
280279

@@ -357,9 +356,12 @@ Here is a file that has 3 bugs (when x,y,z are assigned).
357356
#error C must be defined
358357
#endif
359358

359+
The flag `-D` tells Cppcheck that a name is defined. Cppcheck will only analyze configurations that
360+
contain this define.
361+
362+
The flag `-U` tells Cppcheck that a name is not defined. Cppcheck will only analyze configurations
363+
that does not contain this define.
360364

361-
The flag `-D` tells Cppcheck that a name is defined. There will be no Cppcheck analysis without this define.
362-
The flag `-U` tells Cppcheck that a name is not defined. There will be no Cppcheck analysis with this define.
363365
The flag `--force` and `--max-configs` is used to control how many combinations are checked. When `-D` is used,
364366
Cppcheck will only check 1 configuration unless these are used.
365367

@@ -465,7 +467,8 @@ build dir. For instance, the unusedFunction warnings require whole program analy
465467

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

468-
If you encounter a false positive, then please report it to the Cppcheck team so that it can be fixed.
470+
If you encounter a false positive, please report it to the Cppcheck team so that the issue can be
471+
fixed.
469472

470473
## Plain text suppressions
471474

0 commit comments

Comments
 (0)