From e8daaa69d67b21d75c8ffeca2a27296d4566543e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 3 Sep 2011 17:25:39 +0200 Subject: [PATCH] CLI: --enable=style has always been the same as --enable=style,portability,performance so keep it that way. Ticket #3074 --- cli/cmdlineparser.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 5b21565c6..0885e3f1a 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -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"