Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit ca5e9740b404fe3f58f17168d8521a95c84d7960 1 parent bbb707c
Reijo Tomperi authored February 09, 2012
14  cli/cmdlineparser.cpp
@@ -727,7 +727,7 @@ void CmdLineParser::PrintHelp() const
727 727
               "                                  Warn if there are missing includes. For\n"
728 728
               "                                  detailed information, use '--check-config'.\n"
729 729
               "                         Several ids can be given if you separate them with\n"
730  
-              "                         commas.\n"
  730
+              "                         commas. See also --std\n"
731 731
               "    --error-exitcode=<n> If errors are found, integer [n] is returned instead of\n"
732 732
               "                         the default '0'. '" << EXIT_FAILURE << "' is returned\n"
733 733
               "                         if arguments are not valid or if no input files are\n"
@@ -787,14 +787,16 @@ void CmdLineParser::PrintHelp() const
787 787
               "                         https://sourceforge.net/projects/cppcheck/files/Articles/\n"
788 788
 #endif
789 789
               "    -s, --style          Deprecated, please use '--enable=style' instead\n"
790  
-              "    --std=<id>           Environment. The available options are:\n"
  790
+              "    --std=<id>           Enable some standard related checks.\n"
  791
+              "                         The available options are:\n"
791 792
               "                          * posix\n"
792  
-              "                                 Use this if a posix environment is available\n"
  793
+              "                                 Checks related to POSIX-specific functionality\n"
793 794
               "                          * c99\n"
794  
-              "                                 Use this if the compiler is C99 compatible\n"
  795
+              "                                 C99 standard related checks\n"
795 796
               "                          * c++11\n"
796  
-              "                                 Use this if the compiler is C++11 compatible.\n"
797  
-              "                                 note: you probably want to also use 'c99'.\n"
  797
+              "                                 C++11 standard related checks\n"
  798
+              "                         Example to enable more than one checks:\n"
  799
+              "                           'cppcheck --std=c99 --std=posix file.cpp'\n"
798 800
               "    --suppress=<spec>    Suppress warnings that match <spec>. The format of\n"
799 801
               "                         <spec> is:\n"
800 802
               "                         [error id]:[filename]:[line]\n"
12  man/cppcheck.1.xml
@@ -228,7 +228,7 @@ Example: '-UDEBUG'</para>
228 228
                 </glossdef>
229 229
               </glossentry>              
230 230
             </glosslist>          
231  
-            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.
  231
+            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
232 232
           </para>
233 233
         </listitem>
234 234
       </varlistentry>
@@ -392,28 +392,28 @@ Directory name is matched to all parts of the path.</para>
392 392
       <varlistentry>
393 393
         <term><option>--std=&lt;id&gt;</option></term>
394 394
         <listitem>
395  
-          <para>Enable some environment related checks. The available options are:
  395
+          <para>Enable some standard related checks. The available options are:
396 396
             <glosslist>
397 397
               <glossentry>
398 398
                 <glossterm>posix</glossterm>
399 399
                 <glossdef>
400  
-                  <para>Use this if you want to see posix related errors</para>
  400
+                  <para>Checks related to POSIX-specific functionality</para>
401 401
                 </glossdef>
402 402
               </glossentry>
403 403
               <glossentry>
404 404
                 <glossterm>c99</glossterm>
405 405
                 <glossdef>
406  
-                  <para>Use this if the compiler is C99 compatible</para>
  406
+                  <para>C99 standard related checks</para>
407 407
                 </glossdef>
408 408
               </glossentry>
409 409
               <glossentry>
410 410
                 <glossterm>c++11</glossterm>
411 411
                 <glossdef>
412  
-                  <para>Use this if the compiler is C++11 compatible. Note: you probably want to also use 'c99'.</para>
  412
+                  <para>C++11 standard related checks</para>
413 413
                 </glossdef>
414 414
               </glossentry>
415 415
             </glosslist>          
416  
-            By default all are disabled. To enable more than one, just use --std more than once: 'cppcheck --std=c99 --std=c++11 file.cpp'
  416
+            Example to enable more than one checks: 'cppcheck --std=c99 --std=posix file.cpp'
417 417
           </para>
418 418
         </listitem>
419 419
       </varlistentry>      

0 notes on commit ca5e974

Please sign in to comment.
Something went wrong with that request. Please try again.