Improve --help listing by removing duplicate options list and using lt and gt characters for option arguments.

This commit is contained in:
Reijo Tomperi 2011-02-05 22:59:26 +02:00
parent bc5abd063f
commit 2bded1091b
1 changed files with 23 additions and 27 deletions

View File

@ -607,71 +607,67 @@ void CmdLineParser::PrintHelp()
std::cout << "Cppcheck - A tool for static C/C++ code analysis\n"
"\n"
"Syntax:\n"
" cppcheck [--append=file] [-D<ID>] [--enable=<id>] [--error-exitcode=[n]]\n"
" [--exitcode-suppressions file] [--file-list=file.txt] [--force]\n"
" [--help] [-Idir] [--inline-suppr] [-j [jobs]] [--quiet]\n"
" [--report-progress] [--rule=<rule>] [--rule-file=<file>]\n"
" [--style] [--suppressions-list=file.txt] [--verbose]\n"
" [--version] [--xml] [file or path1] [file or path]\n"
" cppcheck [OPTIONS] [files or paths]\n"
"\n"
"If path is given instead of filename, *.cpp, *.cxx, *.cc, *.c++ and *.c files\n"
"are checked recursively from given directory.\n\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"
" -D<ID> By default Cppcheck checks all configurations.\n"
" Use -D to limit the checking. When -D is used the\n"
" checking is limited to the given configuration.\n"
" Example: -DDEBUG=1 -D__cplusplus\n"
" --enable=id Enable additional checks. The available ids are:\n"
" --enable=<id> Enable additional checks. The available ids are:\n"
" * all - enable all checks\n"
" * style - Check coding style\n"
" * information - Enable information messages\n"
" * unusedFunction - check for unused functions\n"
" * missingInclude - check for missing includes\n"
" Several ids can be given if you separate them with commas\n"
" --error-exitcode=[n] If errors are found, integer [n] is returned instead\n"
" Several ids can be given if you separate them with commas.\n"
" --error-exitcode=<n> If errors are found, integer [n] is returned instead\n"
" of 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"
" --exitcode-suppressions=file\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 per line.\n"
" --file-list=<file> Specify the files to check in a text file. One Filename per line.\n"
" -f, --force Force checking on files that have \"too many\"\n"
" configurations\n"
" -h, --help Print this help\n"
" -I [dir] Give include path. Give several -I parameters to give\n"
" 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"
" paths are relative to source files, this is not needed\n"
" -i [dir] Give path to ignore. Give several -i parameters to ignore\n"
" paths are relative to source files, this is not needed.\n"
" -i <dir> Give path to ignore. Give several -i parameters to ignore\n"
" several paths. Give directory name or filename with path\n"
" as parameter. Directory name is matched to all parts of the\n"
" path.\n"
" --inline-suppr Enable inline suppressions. Use them by placing one or\n"
" more comments, like: // cppcheck-suppress warningId\n"
" on the lines before the warning to suppress.\n"
" -j [jobs] Start [jobs] threads to do the checking simultaneously.\n"
" -q, --quiet Only print error messages\n"
" -j <jobs> Start [jobs] threads to do the checking simultaneously.\n"
" -q, --quiet Only print error messages.\n"
" --report-progress Report progress messages while checking a file.\n"
" --rule=<rule> match regular expression\n"
" --rule-file=<file> use given rule file\n"
" -s, --style deprecated, use --enable=style\n"
" --suppressions-list=file\n"
" --rule=<rule> Match regular expression.\n"
" --rule-file=<file> Use given rule file. For more information, see: \n"
" https://sourceforge.net/projects/cppcheck/files/Articles/\n"
" -s, --style Deprecated, use --enable=style\n"
" --suppressions-list=<file>\n"
" Suppress warnings listed in the file. Filename and line\n"
" are optional in the suppression file. The format of the\n"
" single line in the suppression file is:\n"
" [error id]:[filename]:[line]\n"
" --template '[text]' Format the error messages. E.g.\n"
" --template '<text>' Format the error messages. E.g.\n"
" '{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"
" --version Print out version number\n"
" -v, --verbose More detailed error reports.\n"
" --version Print out version number.\n"
" --xml Write results in xml to error stream.\n"
" --xml-version=[version]\n"
" --xml-version=<version>\n"
" Select the XML file version. Currently versions 1 and 2\n"
" are available. The default version is 1."
"\n"