CLI: --enable=style has always been the same as --enable=style,portability,performance so keep it that way. Ticket #3074

This commit is contained in:
Daniel Marjamäki 2011-09-03 17:25:39 +02:00
parent d23c58d387
commit e8daaa69d6
1 changed files with 11 additions and 3 deletions

View File

@ -280,6 +280,12 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
PrintMessage(errmsg); PrintMessage(errmsg);
return false; return false;
} }
// when "style" is enabled, also enable "performance" and "portability"
else if (strstr(argv[i]+9, "style"))
{
_settings->addEnabled("performance");
_settings->addEnabled("portability");
}
} }
// --error-exitcode=1 // --error-exitcode=1
@ -663,11 +669,13 @@ void CmdLineParser::PrintHelp()
" * all\n" " * all\n"
" Enable all checks\n" " Enable all checks\n"
" * style\n" " * style\n"
" Check coding style\n" " Enable all coding style checks. All messages\n"
" with the severities 'style', 'performance'\n"
" and 'portability' are enabled.\n"
" * performance\n" " * performance\n"
" Check for performance problems\n" " Enable performance messages\n"
" * portability\n" " * portability\n"
" Check for portability problems\n" " Enable portability messages\n"
" * information\n" " * information\n"
" Enable information messages\n" " Enable information messages\n"
" * unusedFunction\n" " * unusedFunction\n"