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
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,13 +126,13 @@ Typically a `compile_commands.json` contains absolute paths. However no matter i
126
126
* a file with relative path `src/test2.c` can be checked.
127
127
* a file with relative path `src/test3.cpp` is not checked.
128
128
129
-
### Excluding a file or folder from checking
129
+
### Exclude files matching a given pattern
130
130
131
-
The option `-i` specifies a pattern to files/folders to exclude. With this command no files in `src/c` are checked:
131
+
With `-i <str>` you can configure filename/directory patterns that should be excluded from checking.
132
132
133
-
cppcheck -isrc/c src
133
+
> *Note*: If you want to filter out warnings for a header file then `-i` will not work. The option `--suppress` should be used instead.
134
134
135
-
The `-i` option is not used during preprocessing, it can't be used to exclude headers that are included.
135
+
Translation units are skipped if their *source filename* matches the exclusion pattern. This filtering happens *before*preprocessing, and the exclusion patterns are not applied during preprocessing or analysis.
136
136
137
137
You can use `**`, `*` and `?` in the pattern to specify excluded folders/files.
138
138
`**`: matches zero or more characters, including path separators
0 commit comments