| 55 | }; |
| 56 | |
| 57 | bool parseReportFile(PathId logFileId, Result& result) { |
| 58 | FileSystem* const fileSystem = FileSystem::getInstance(); |
| 59 | bool ret = false; |
| 60 | std::istream& ifs = fileSystem->openForRead(logFileId); |
| 61 | if (ifs.good()) { |
| 62 | std::string line; |
| 63 | while (std::getline(ifs, line)) { |
| 64 | if (ifs.bad()) break; |
| 65 | line = StringUtils::rtrim(line); |
| 66 | if (line.find("[ FATAL] : ") == 0) { |
| 67 | result.m_nbFatal = line.substr(12); |
| 68 | } |
| 69 | if (line.find("[ SYNTAX] : ") == 0) { |
| 70 | result.m_nbSyntax = line.substr(12); |
| 71 | } |
| 72 | if (line.find("[ ERROR] : ") == 0) { |
| 73 | result.m_nbError = line.substr(12); |
| 74 | } |
| 75 | if (line.find("[WARNING] : ") == 0) { |
| 76 | result.m_nbWarning = line.substr(12); |
| 77 | } |
| 78 | if (line.find("[ NOTE] : ") == 0) { |
| 79 | result.m_nbNote = line.substr(12); |
| 80 | ret = true; |
| 81 | } |
| 82 | if (line.find("[ INFO] : ") == 0) { |
| 83 | result.m_nbInfo = line.substr(12); |
| 84 | ret = true; |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | fileSystem->close(ifs); |
| 89 | return ret; |
| 90 | } |
| 91 | |
| 92 | std::pair<bool, bool> Report::makeDiffCompUnitReport(CommandLineParser* clp, |
| 93 | SymbolTable* st) { |
no test coverage detected