| 1627 | } |
| 1628 | |
| 1629 | void CppCheck::executeAddonsWholeProgram(const std::list<FileWithDetails> &files, const std::list<FileSettings>& fileSettings, const std::string& ctuInfo) |
| 1630 | { |
| 1631 | if (mSettings.addons.empty()) |
| 1632 | return; |
| 1633 | |
| 1634 | if (mSettings.buildDir.empty()) { |
| 1635 | std::string fileName = std::to_string(mSettings.pid) + ".ctu-info"; |
| 1636 | FilesDeleter filesDeleter; |
| 1637 | filesDeleter.addFile(fileName); |
| 1638 | std::ofstream fout(fileName); |
| 1639 | fout << ctuInfo; |
| 1640 | fout.close(); |
| 1641 | executeAddons({std::move(fileName)}, ""); |
| 1642 | return; |
| 1643 | } |
| 1644 | |
| 1645 | std::vector<std::string> ctuInfoFiles; |
| 1646 | for (const auto &f: files) { |
| 1647 | const std::string &dumpFileName = getDumpFileName(mSettings, f); |
| 1648 | ctuInfoFiles.push_back(getCtuInfoFileName(dumpFileName)); |
| 1649 | } |
| 1650 | |
| 1651 | for (const auto &fs: fileSettings) { |
| 1652 | const std::string &dumpFileName = getDumpFileName(mSettings, fs.file); |
| 1653 | ctuInfoFiles.push_back(getCtuInfoFileName(dumpFileName)); |
| 1654 | } |
| 1655 | |
| 1656 | executeAddons(ctuInfoFiles, ""); |
| 1657 | } |
| 1658 | |
| 1659 | void CppCheck::tooManyConfigsError(const std::string &file, const int numberOfConfigurations) |
| 1660 | { |
nothing calls this directly
no test coverage detected