cppcheck: Write version number etc

This commit is contained in:
Daniel Marjamäki 2008-11-29 13:58:28 +00:00
parent 95c7e1a7d3
commit 87794cc66c
1 changed files with 8 additions and 7 deletions

View File

@ -118,23 +118,24 @@ std::string CppCheck::parseFromArgs( int argc, char* argv[] )
if (_filenames.empty()) if (_filenames.empty())
{ {
std::ostringstream oss; std::ostringstream oss;
oss << "C/C++ code checking.\n" oss << "c++check 1.26\n"
"\n"
"C/C++ code checking\n"
"\n" "\n"
"Syntax:\n" "Syntax:\n"
" cppcheck [--all] [--style] [--errorsonly] [--recursive] [filename1] [filename2]\n" " cppcheck [--all] [--style] [--errorsonly] [--recursive] [filename1] [filename2]\n"
"\n" "\n"
"Options:\n" "Options:\n"
" --all Normally a message is only shown if cppcheck is sure\n" " --all Make the checking more sensitive. More bugs are detected,\n"
" it has found a bug.\n" " but there are also more false positives\n"
" When this option is given, all messages are shown.\n" " --style Check coding style\n"
"\n" " --errorsonly Only print error messages\n"
" --style Check coding style.\n"
" --errorsonly Only print something when there is an error\n"
" --recursive Recursively check all *.cpp, *.cxx, *.cc and *.c files\n"; " --recursive Recursively check all *.cpp, *.cxx, *.cc and *.c files\n";
return oss.str(); return oss.str();
} }
// Check function usage if "--style" and "--all" was given. // Check function usage if "--style" and "--all" was given.
// There will be false positives for exported library functions
if ( _settings._showAll && _settings._checkCodingStyle ) if ( _settings._showAll && _settings._checkCodingStyle )
_settings._checkFunctionUsage = true; _settings._checkFunctionUsage = true;