Skip to content

Commit 5426dd2

Browse files
committed
Update docs
1 parent 2c31122 commit 5426dd2

3 files changed

Lines changed: 19 additions & 12 deletions

File tree

cli/cmdlineparser.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,10 +1774,9 @@ void CmdLineParser::printHelp() const
17741774
" this is not needed.\n"
17751775
" --include=<file>\n"
17761776
" Force inclusion of a file before the checked file.\n"
1777-
" -i <dir or file> Give a source file or source file directory to exclude\n"
1778-
" from the check. This applies only to source files so\n"
1779-
" header files included by source files are not matched.\n"
1780-
" Directory name is matched to all parts of the path.\n"
1777+
" -i <str> Exclude source files or directories matching str from\n"
1778+
" the check. This applies only to source files so header\n"
1779+
" files included by source files are not matched.\n"
17811780
" --inconclusive Allow that Cppcheck reports even though the analysis is\n"
17821781
" inconclusive.\n"
17831782
" There are false positives with this option. Each result\n"

man/manual-premium.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,17 @@ check:
121121

122122
All files under src/a and src/b are then checked.
123123

124-
The second option is to use -i, which specifies the files/paths to ignore. With this command no files in src/c are
125-
checked:
124+
The second option is to use -i, which specifies a pattern of path names to ignore. With this command no files in src/c
125+
are checked:
126126

127127
cppcheck -isrc/c src
128128

129-
This option is only valid when supplying an input directory. To ignore multiple directories supply the -i flag for each
130-
directory individually. The following command ignores both the src/b and src/c directories:
129+
The above pattern matches any path that has a component named src anywhere, which is directly followed by a component
130+
named c. c can be a file or a directory, in which case all files below c are ignored. Patterns can also be absolute
131+
paths, or relative to the current directory if the first path component is dot or dot-dot. The glob characters ?, \*
132+
and \*\* are allowed. ? matches one character, \* and \*\* match any number of characters. \*\* matches path
133+
separators, where as ? and \* does not. Multiple patterns can be used by supplying the -i flag multiple times. The
134+
following command ignores everything in both the src/b and src/c directories:
131135

132136
cppcheck -isrc/b -isrc/c
133137

man/manual.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,17 @@ check:
122122

123123
All files under src/a and src/b are then checked.
124124

125-
The second option is to use -i, which specifies the files/paths to ignore. With this command no files in src/c are
126-
checked:
125+
The second option is to use -i, which specifies a pattern of path names to ignore. With this command no files in src/c
126+
are checked:
127127

128128
cppcheck -isrc/c src
129129

130-
This option is only valid when supplying an input directory. To ignore multiple directories supply the -i flag for each
131-
directory individually. The following command ignores both the src/b and src/c directories:
130+
The above pattern matches any path that has a component named src anywhere, which is directly followed by a component
131+
named c. c can be a file or a directory, in which case all files below c are ignored. Patterns can also be absolute
132+
paths, or relative to the current directory if the first path component is dot or dot-dot. The glob characters ?, \*
133+
and \*\* are allowed. ? matches one character, \* and \*\* match any number of characters. \*\* matches path
134+
separators, where as ? and \* does not. Multiple patterns can be used by supplying the -i flag multiple times. The
135+
following command ignores everything in both the src/b and src/c directories:
132136

133137
cppcheck -isrc/b -isrc/c
134138

0 commit comments

Comments
 (0)