MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / getXmlReport

Method getXmlReport

lib/checkersreport.cpp:232–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232std::string CheckersReport::getXmlReport(const std::string& criticalErrors) const
233{
234 std::string ret;
235 if (!criticalErrors.empty())
236 ret += " <critical-errors>" + criticalErrors + "</critical-errors>\n";
237 else
238 ret += " <critical-errors/>\n";
239 ret += " <checkers-report>\n";
240 const int misraCVersion = getMisraCVersion(mSettings);
241 for (std::string checker: mActiveCheckers) {
242 if (checker.compare(0,8,"Misra C:") == 0)
243 checker = "Misra C " + std::to_string(misraCVersion) + ":" + checker.substr(8);
244 ret += " <checker id=\"" + checker + "\"/>\n";
245 }
246 ret += " </checkers-report>";
247 return ret;
248}

Callers 1

writeCheckersReportMethod · 0.80

Calls 3

getMisraCVersionFunction · 0.85
emptyMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected