--template: Removed 'clang' and renamed 'cppcheck2' to 'daca2'
This commit is contained in:
parent
dda5556ded
commit
0262020707
|
@ -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"
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 << ']';
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue