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

http://sourceforge.net/apps/trac/cppcheck/ticket/3578
This commit is contained in:
Reijo Tomperi 2012-02-09 18:34:16 +02:00
parent bbb707c460
commit ca5e9740b4
2 changed files with 14 additions and 12 deletions

View File

@ -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 File

@ -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>