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"
" cppcheck [OPTIONS] [files or paths]\n"
"\n"
"If path is given instead of filename, *.cpp, *.cxx, *.cc, *.c++, *.c, *.tpp,\n"
"and *.txx are checked recursively from given directory.\n\n"
"If a directory is given instead of a filename, *.cpp, *.cxx, *.cc, *.c++, *.c,\n"
"*.tpp, and *.txx files are checked recursively from the given directory.\n\n"
"Options:\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"
" analysis is disabled by this flag.\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"
" commas.\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"
" provided. Note that your operating system can\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"
" Used when certain messages should be displayed but\n"
" should not cause a non-zero exitcode.\n"
" --file-list=<file> Specify the files to check in a text file. One Filename\n"
" per line.\n"
" -f, --force Force checking on files that have \"too many\"\n"
" configurations.\n"
" --file-list=<file> Specify the files to check in a text file. Add one\n"
" filename per line.\n"
" -f, --force Force checking of all configurations in files that have\n"
" \"too many\" configurations.\n"
" -h, --help Print this help.\n"
" -I <dir> Give include path. Give several -I parameters to give\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}) {message}'\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"
" --xml Write results in xml to error stream.\n"
" --xml Write results in xml format to error stream (stderr).\n"
" --xml-version=<version>\n"
" Select the XML file version. Currently versions 1 and 2\n"
" are available. The default version is 1."
"\n"
"Example usage:\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"
" # Recursively check ../myproject/ and don't print progress:\n"
" cppcheck --quiet ../myproject/\n"