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);
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
@ -663,11 +669,13 @@ void CmdLineParser::PrintHelp()
" * all\n"
" Enable all checks\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"
" Check for performance problems\n"
" Enable performance messages\n"
" * portability\n"
" Check for portability problems\n"
" Enable portability messages\n"
" * information\n"
" Enable information messages\n"
" * unusedFunction\n"