Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix #3578 (--std help text in cli is confusing)

  • Loading branch information...
commit ca5e9740b404fe3f58f17168d8521a95c84d7960 1 parent bbb707c
@aggro80 aggro80 authored
Showing with 14 additions and 12 deletions.
  1. +8 −6 cli/cmdlineparser.cpp
  2. +6 −6 man/cppcheck.1.xml
View
14 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=<n> 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=<id> Environment. The available options are:\n"
+ " --std=<id> 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=<spec> Suppress warnings that match <spec>. The format of\n"
" <spec> is:\n"
" [error id]:[filename]:[line]\n"
View
12 man/cppcheck.1.xml
@@ -228,7 +228,7 @@ Example: '-UDEBUG'</para>
</glossdef>
</glossentry>
</glosslist>
- 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
</para>
</listitem>
</varlistentry>
@@ -392,28 +392,28 @@ Directory name is matched to all parts of the path.</para>
<varlistentry>
<term><option>--std=&lt;id&gt;</option></term>
<listitem>
- <para>Enable some environment related checks. The available options are:
+ <para>Enable some standard related checks. The available options are:
<glosslist>
<glossentry>
<glossterm>posix</glossterm>
<glossdef>
- <para>Use this if you want to see posix related errors</para>
+ <para>Checks related to POSIX-specific functionality</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>c99</glossterm>
<glossdef>
- <para>Use this if the compiler is C99 compatible</para>
+ <para>C99 standard related checks</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>c++11</glossterm>
<glossdef>
- <para>Use this if the compiler is C++11 compatible. Note: you probably want to also use 'c99'.</para>
+ <para>C++11 standard related checks</para>
</glossdef>
</glossentry>
</glosslist>
- 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'
</para>
</listitem>
</varlistentry>
Please sign in to comment.
Something went wrong with that request. Please try again.