| 230 | } |
| 231 | |
| 232 | std::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 | } |
no test coverage detected