CLI: Improve and clarify help text.

This commit is contained in:
Kimmo Varis 2011-07-16 11:19:35 +03:00
parent c299d02dba
commit 0db45a30e5
1 changed files with 12 additions and 12 deletions

View File

@ -643,11 +643,11 @@ void CmdLineParser::PrintHelp()
"Syntax:\n" "Syntax:\n"
" cppcheck [OPTIONS] [files or paths]\n" " cppcheck [OPTIONS] [files or paths]\n"
"\n" "\n"
"If path is given instead of filename, *.cpp, *.cxx, *.cc, *.c++, *.c, *.tpp,\n" "If a directory is given instead of a filename, *.cpp, *.cxx, *.cc, *.c++, *.c,\n"
"and *.txx are checked recursively from given directory.\n\n" "*.tpp, and *.txx files are checked recursively from the given directory.\n\n"
"Options:\n" "Options:\n"
" --append=<file> This allows you to provide information about\n" " --append=<file> This allows you to provide information about\n"
" functions by providing an implementation for these.\n" " functions by providing an implementation for them.\n"
" --check-config Check cppcheck configuration. The normal code\n" " --check-config Check cppcheck configuration. The normal code\n"
" analysis is disabled by this flag.\n" " analysis is disabled by this flag.\n"
" -D<ID> By default Cppcheck checks all configurations.\n" " -D<ID> By default Cppcheck checks all configurations.\n"
@ -669,18 +669,18 @@ void CmdLineParser::PrintHelp()
" Several ids can be given if you separate them with\n" " Several ids can be given if you separate them with\n"
" commas.\n" " commas.\n"
" --error-exitcode=<n> If errors are found, integer [n] is returned instead\n" " --error-exitcode=<n> If errors are found, integer [n] is returned instead\n"
" of default 0. " << EXIT_FAILURE << " is returned\n" " of the default 0. " << EXIT_FAILURE << " is returned\n"
" if arguments are not valid or if no input files are\n" " if arguments are not valid or if no input files are\n"
" provided. Note that your operating system can\n" " provided. Note that your operating system can\n"
" modify this value, e.g. 256 can become 0.\n" " modify this value, e.g. 256 can become 0.\n"
" --errorlist Print a list of all error messages in XML format.\n" " --errorlist Print a list of all the error messages in XML format.\n"
" --exitcode-suppressions=<file>\n" " --exitcode-suppressions=<file>\n"
" Used when certain messages should be displayed but\n" " Used when certain messages should be displayed but\n"
" should not cause a non-zero exitcode.\n" " should not cause a non-zero exitcode.\n"
" --file-list=<file> Specify the files to check in a text file. One Filename\n" " --file-list=<file> Specify the files to check in a text file. Add one\n"
" per line.\n" " filename per line.\n"
" -f, --force Force checking on files that have \"too many\"\n" " -f, --force Force checking of all configurations in files that have\n"
" configurations.\n" " \"too many\" configurations.\n"
" -h, --help Print this help.\n" " -h, --help Print this help.\n"
" -I <dir> Give include path. Give several -I parameters to give\n" " -I <dir> Give include path. Give several -I parameters to give\n"
" several paths. First given path is checked first. If\n" " several paths. First given path is checked first. If\n"
@ -711,16 +711,16 @@ void CmdLineParser::PrintHelp()
" '{file}:{line},{severity},{id},{message}' or\n" " '{file}:{line},{severity},{id},{message}' or\n"
" '{file}({line}):({severity}) {message}'\n" " '{file}({line}):({severity}) {message}'\n"
" Pre-defined templates: gcc, vs\n" " Pre-defined templates: gcc, vs\n"
" -v, --verbose More detailed error reports.\n" " -v, --verbose Output more detailed error information.\n"
" --version Print out version number.\n" " --version Print out version number.\n"
" --xml Write results in xml to error stream.\n" " --xml Write results in xml format to error stream (stderr).\n"
" --xml-version=<version>\n" " --xml-version=<version>\n"
" Select the XML file version. Currently versions 1 and 2\n" " Select the XML file version. Currently versions 1 and 2\n"
" are available. The default version is 1." " are available. The default version is 1."
"\n" "\n"
"Example usage:\n" "Example usage:\n"
" # Recursively check the current folder. Print the progress on the screen and\n" " # Recursively check the current folder. Print the progress on the screen and\n"
" write errors in a file:\n" " write errors to a file:\n"
" cppcheck . 2> err.txt\n" " cppcheck . 2> err.txt\n"
" # Recursively check ../myproject/ and don't print progress:\n" " # Recursively check ../myproject/ and don't print progress:\n"
" cppcheck --quiet ../myproject/\n" " cppcheck --quiet ../myproject/\n"