You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: man/manual.md
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,7 @@ The second option is to use -i, with it you specify files/paths to ignore. With
94
94
95
95
cppcheck -isrc/c src
96
96
97
-
This option does not currently work with the `--project` option and is only valid when supplying an input directory. To ignore multiple directories supply the -i multiple times. The following command ignores both the src/b and src/c directories.
97
+
This option is only valid when supplying an input directory. To ignore multiple directories supply the -i multiple times. The following command ignores both the src/b and src/c directories.
98
98
99
99
cppcheck -isrc/b -isrc/c
100
100
@@ -138,6 +138,10 @@ You can import and use Cppcheck GUI project files in the command line tool:
138
138
139
139
The Cppcheck GUI has a few options that are not available in the command line directly. To use these options you can import a GUI project file. We want to keep the command line tool usage simple and limit the options by intention.
140
140
141
+
To ignore certain folders in the project you can use `-i`. This will skip analysis of source files in the `foo` folder.
142
+
143
+
cppcheck --project=foobar.cppcheck -ifoo
144
+
141
145
## CMake
142
146
143
147
Generate a compile database:
@@ -148,6 +152,11 @@ The file `compile_commands.json` is created in the current folder. Now run Cppch
148
152
149
153
cppcheck --project=compile_commands.json
150
154
155
+
To ignore certain folders you can use `-i`. This will skip analysis of source files in the `foo` folder.
156
+
157
+
cppcheck --project=compile_commands.json -ifoo
158
+
159
+
151
160
## Visual Studio
152
161
153
162
You can run Cppcheck on individual project files (\*.vcxproj) or on a whole solution (\*.sln)
@@ -162,12 +171,21 @@ Running Cppcheck on a Visual Studio project:
162
171
163
172
In the `Cppcheck GUI` you have the choice to only analyze a single debug configuration. If you want to use this choice on the command line then create a `Cppcheck GUI` project with this activated and then import the GUI project file on the command line.
164
173
174
+
To ignore certain folders in the project you can use `-i`. This will skip analysis of source files in the `foo` folder.
175
+
176
+
cppcheck --project=foobar.vcxproj -ifoo
177
+
165
178
## C++ Builder 6
166
179
167
180
Running Cppcheck on a C++ Builder 6 project:
168
181
169
182
cppcheck --project=foobar.bpr
170
183
184
+
185
+
To ignore certain folders in the project you can use `-i`. This will skip analysis of source files in the `foo` folder.
186
+
187
+
cppcheck --project=foobar.bpr -ifoo
188
+
171
189
## Other
172
190
173
191
If you can generate a compile database then it's possible to import that in Cppcheck.
@@ -182,7 +200,7 @@ You should use a platform configuration that match your target.
182
200
183
201
By default Cppcheck uses native platform configuration that works well if your code is compiled and executed locally.
184
202
185
-
Cppcheck has builtin configurations for Unix and Windows targets. You can easily use these with the --platform command line flag.
203
+
Cppcheck has builtin configurations for Unix and Windows targets. You can easily use these with the `--platform` command line flag.
186
204
187
205
You can also create your own custom platform configuration in a XML file. Here is an example:
0 commit comments