diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 209c526b9..18b532a3d 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -996,7 +996,7 @@ void CmdLineParser::PrintHelp() " '{file}:{line},{severity},{id},{message}' or\n" " '{file}({line}):({severity}) {message}' or\n" " '{callstack} {message}'\n" - " Pre-defined templates: clang, cppcheck2, gcc, vs, edit.\n" + " Pre-defined templates: gcc, vs, edit.\n" " -v, --verbose Output more detailed error information.\n" " --version Print out version number.\n" " --xml Write results in xml format to error stream (stderr).\n" diff --git a/lib/check.h b/lib/check.h index d7cba73eb..7782dcd88 100644 --- a/lib/check.h +++ b/lib/check.h @@ -169,7 +169,7 @@ protected: ErrorPath errorPath; if (!value) { errorPath.push_back(ErrorPathItem(errtok,bug)); - } else if (_settings->verbose || _settings->xml || _settings->outputFormat == "clang" || _settings->outputFormat == "cppcheck2") { + } else if (_settings->verbose || _settings->xml || _settings->outputFormat == "daca2") { errorPath = value->errorPath; errorPath.push_back(ErrorPathItem(errtok,bug)); } else { diff --git a/lib/errorlogger.cpp b/lib/errorlogger.cpp index 4daefd734..bbd4cc084 100644 --- a/lib/errorlogger.cpp +++ b/lib/errorlogger.cpp @@ -413,7 +413,8 @@ std::string ErrorLogger::ErrorMessage::toString(bool verbose, const std::string return text.str(); } - else if (outputFormat == "clang" || outputFormat == "cppcheck2") { + else if (outputFormat == "daca2") { + // This is a clang-like output format for daca2 std::ostringstream text; if (_callStack.empty()) { text << "nofile:0:0: "; @@ -422,13 +423,9 @@ std::string ErrorLogger::ErrorMessage::toString(bool verbose, const std::string text << loc.getfile() << ':' << loc.line << ':' << loc.col << ": "; } - if (outputFormat == "clang") - text << ((_id == "syntaxError" || _id=="internalError") ? "error: " : "warning: "); - else { - if (_inconclusive) - text << "inconclusive "; - text << Severity::toString(_severity) << ": "; - } + if (_inconclusive) + text << "inconclusive "; + text << Severity::toString(_severity) << ": "; text << (verbose ? _verboseMessage : _shortMessage) << " [" << _id << ']'; diff --git a/tools/daca2.py b/tools/daca2.py index 5b099931f..42e9ff186 100644 --- a/tools/daca2.py +++ b/tools/daca2.py @@ -152,7 +152,7 @@ def scanarchive(filepath, jobs, cpulimit): cmd = 'cpulimit --limit=' + cpulimit else: cmd = 'nice --adjustment=1000' - cmd = cmd + ' ../cppcheck-O2 -D__GCC__ --enable=style --inconclusive --error-exitcode=0 --exception-handling=stderr ' + jobs + ' --template=cppcheck2 .' + cmd = cmd + ' ../cppcheck-O2 -D__GCC__ --enable=style --inconclusive --error-exitcode=0 --exception-handling=stderr ' + jobs + ' --template=daca2 .' cmds = cmd.split() p = subprocess.Popen(cmds, stdout=subprocess.PIPE, stderr=subprocess.PIPE)