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

Method getAnalyzerInfoFileFromFilesTxt

lib/analyzerinfo.cpp:129–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129std::string AnalyzerInformation::getAnalyzerInfoFileFromFilesTxt(std::istream& filesTxt, const std::string &sourcefile, const std::string &cfg, int fsFileId)
130{
131 std::string line;
132 while (std::getline(filesTxt,line)) {
133 AnalyzerInformation::Info filesTxtInfo;
134 if (!filesTxtInfo.parse(line))
135 continue; // TODO: report error?
136 if (endsWith(sourcefile, filesTxtInfo.sourceFile) && filesTxtInfo.cfg == cfg && filesTxtInfo.fsFileId == fsFileId)
137 return filesTxtInfo.afile;
138 }
139 return "";
140}
141
142std::string AnalyzerInformation::getAnalyzerInfoFile(const std::string &buildDir, const std::string &sourcefile, const std::string &cfg, std::size_t fsFileId)
143{

Callers

nothing calls this directly

Calls 3

getlineFunction · 0.85
endsWithFunction · 0.70
parseMethod · 0.45

Tested by

no test coverage detected