diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 88cf0efd6..3e4752377 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -727,7 +727,7 @@ void CmdLineParser::PrintHelp() const " Warn if there are missing includes. For\n" " detailed information, use '--check-config'.\n" " Several ids can be given if you separate them with\n" - " commas.\n" + " commas. See also --std\n" " --error-exitcode= If errors are found, integer [n] is returned instead of\n" " the default '0'. '" << EXIT_FAILURE << "' is returned\n" " if arguments are not valid or if no input files are\n" @@ -787,14 +787,16 @@ void CmdLineParser::PrintHelp() const " https://sourceforge.net/projects/cppcheck/files/Articles/\n" #endif " -s, --style Deprecated, please use '--enable=style' instead\n" - " --std= Environment. The available options are:\n" + " --std= Enable some standard related checks.\n" + " The available options are:\n" " * posix\n" - " Use this if a posix environment is available\n" + " Checks related to POSIX-specific functionality\n" " * c99\n" - " Use this if the compiler is C99 compatible\n" + " C99 standard related checks\n" " * c++11\n" - " Use this if the compiler is C++11 compatible.\n" - " note: you probably want to also use 'c99'.\n" + " C++11 standard related checks\n" + " Example to enable more than one checks:\n" + " 'cppcheck --std=c99 --std=posix file.cpp'\n" " --suppress= Suppress warnings that match . The format of\n" " is:\n" " [error id]:[filename]:[line]\n" diff --git a/man/cppcheck.1.xml b/man/cppcheck.1.xml index 75b885c4f..068d74019 100644 --- a/man/cppcheck.1.xml +++ b/man/cppcheck.1.xml @@ -228,7 +228,7 @@ Example: '-UDEBUG' - By default none of the additional checks are enabled. Several ids can be given if you separate them with commas, e.g. --enable=style,unusedFunction. + By default none of the additional checks are enabled. Several ids can be given if you separate them with commas, e.g. --enable=style,unusedFunction. See also --std @@ -392,28 +392,28 @@ Directory name is matched to all parts of the path. - Enable some environment related checks. The available options are: + Enable some standard related checks. The available options are: posix - Use this if you want to see posix related errors + Checks related to POSIX-specific functionality c99 - Use this if the compiler is C99 compatible + C99 standard related checks c++11 - Use this if the compiler is C++11 compatible. Note: you probably want to also use 'c99'. + C++11 standard related checks - By default all are disabled. To enable more than one, just use --std more than once: 'cppcheck --std=c99 --std=c++11 file.cpp' + Example to enable more than one checks: 'cppcheck --std=c99 --std=posix file.cpp'