Skip to content

Commit 495865d

Browse files
Improve documentation of --enable (#7888)
1 parent 3b12959 commit 495865d

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

cli/cmdlineparser.cpp

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,9 +1745,9 @@ void CmdLineParser::printHelp() const
17451745
" be considered for evaluation.\n"
17461746
" --config-excludes-file=<file>\n"
17471747
" A file that contains a list of config-excludes\n"
1748-
" --disable=<id> Disable individual checks.\n"
1749-
" Please refer to the documentation of --enable=<id>\n"
1750-
" for further details.\n"
1748+
" --disable=<severity> Disable checks with the given severity.\n"
1749+
" Please refer to the documentation of --enable for\n"
1750+
" further details.\n"
17511751
" --dump Dump xml data for each translation unit. The dump\n"
17521752
" files have the extension .dump and contain ast,\n"
17531753
" tokenlist, symboldatabase, valueflow.\n"
@@ -1757,31 +1757,24 @@ void CmdLineParser::printHelp() const
17571757
" Example: '-DDEBUG=1 -D__cplusplus'.\n"
17581758
" -E Print preprocessor output on stdout and don't do any\n"
17591759
" further processing.\n"
1760-
" --enable=<id> Enable additional checks. The available ids are:\n"
1761-
" * all\n"
1762-
" Enable all checks. It is recommended to only\n"
1763-
" use --enable=all when the whole program is\n"
1764-
" scanned, because this enables unusedFunction.\n"
1760+
" --enable=<severity> Enable additional checks grouped by severity. The available\n"
1761+
" severities are:\n"
17651762
" * warning\n"
1766-
" Enable warning messages\n"
1767-
" * style\n"
1768-
" Enable all coding style checks. All messages\n"
1769-
" with the severities 'style', 'warning',\n"
1770-
" 'performance' and 'portability' are enabled.\n"
17711763
" * performance\n"
1772-
" Enable performance messages\n"
17731764
" * portability\n"
1774-
" Enable portability messages\n"
17751765
" * information\n"
1776-
" Enable information messages\n"
1766+
" * style\n"
1767+
" Enable checks with severities 'style', 'warning',\n"
1768+
" 'performance' and 'portability'.\n"
17771769
" * unusedFunction\n"
17781770
" Check for unused functions. It is recommended\n"
17791771
" to only enable this when the whole program is\n"
17801772
" scanned.\n"
17811773
" * missingInclude\n"
1782-
" Warn if there are missing includes.\n"
1783-
" Several ids can be given if you separate them with\n"
1784-
" commas. See also --std\n"
1774+
" Check for missing include files.\n"
1775+
" * all\n"
1776+
" Enable all checks.\n"
1777+
" Pass multiple severities as a comma-separated list.\n"
17851778
" --error-exitcode=<n> If errors are found, integer [n] is returned instead of\n"
17861779
" the default '0'. '" << EXIT_FAILURE << "' is returned\n"
17871780
" if arguments are not valid or if no input files are\n"

0 commit comments

Comments
 (0)