File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 19
19
#include " cppcheckexecutor.h"
20
20
21
21
#include " analyzerinfo.h"
22
+ #include " checkers.h"
22
23
#include " checkersreport.h"
23
24
#include " cmdlinelogger.h"
24
25
#include " cmdlineparser.h"
@@ -621,12 +622,16 @@ void StdLogger::reportErr(const ErrorMessage &msg)
621
622
if (!mShownErrors .insert (msg.toString (mSettings .verbose )).second )
622
623
return ;
623
624
625
+ ErrorMessage msgCopy = msg;
626
+ msgCopy.guideline = checkers::getGuideline (msgCopy.id , mSettings .reportType );
627
+ msgCopy.classification = checkers::getClassification (msgCopy.guideline , mSettings .reportType );
628
+
624
629
if (mSettings .outputFormat == Settings::OutputFormat::sarif)
625
- mSarifReport .addFinding (msg );
630
+ mSarifReport .addFinding (msgCopy );
626
631
else if (mSettings .xml )
627
- reportErr (msg .toXML ());
632
+ reportErr (msgCopy .toXML ());
628
633
else
629
- reportErr (msg .toString (mSettings .verbose , mSettings .templateFormat , mSettings .templateLocation ));
634
+ reportErr (msgCopy .toString (mSettings .verbose , mSettings .templateFormat , mSettings .templateLocation ));
630
635
}
631
636
632
637
/* *
You can’t perform that action at this time.
0 commit comments