ErrorLogger: add {cwe} (#1341)
This commit is contained in:
parent
f79849f6ba
commit
0ca6ab1a71
|
@ -1050,6 +1050,7 @@ void CmdLineParser::printHelp()
|
|||
" {severity} severity\n"
|
||||
" {message} warning message\n"
|
||||
" {id} warning id\n"
|
||||
" {cwe} CWE id (Common Weakness Enumeration)\n"
|
||||
" {code} show the real code\n"
|
||||
" \\t insert tab\n"
|
||||
" \\n insert newline\n"
|
||||
|
|
|
@ -487,6 +487,7 @@ std::string ErrorLogger::ErrorMessage::toString(bool verbose, const std::string
|
|||
findAndReplace(result, replaceFrom, replaceWith);
|
||||
}
|
||||
findAndReplace(result, "{severity}", Severity::toString(_severity));
|
||||
findAndReplace(result, "{cwe}", MathLib::toString(_cwe.id));
|
||||
findAndReplace(result, "{message}", verbose ? mVerboseMessage : mShortMessage);
|
||||
findAndReplace(result, "{callstack}", _callStack.empty() ? emptyString : callStackToString(_callStack));
|
||||
if (!_callStack.empty()) {
|
||||
|
|
Loading…
Reference in New Issue