Skip to content

Commit

Permalink
CppCheck: delete cppcheck-addon-ctu-file-list after usage (#6984)
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave authored Dec 2, 2024
1 parent eea05df commit cd0022b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/cppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1423,8 +1423,11 @@ void CppCheck::executeAddons(const std::vector<std::string>& files, const std::s
std::string fileList;

if (files.size() >= 2 || endsWith(files[0], ".ctu-info")) {
// TODO: can this conflict when using -j?
fileList = Path::getPathFromFilename(files[0]) + FILELIST;
std::ofstream fout(fileList);
filesDeleter.addFile(fileList);
// TODO: check if file could be created
for (const std::string& f: files)
fout << f << std::endl;
}
Expand Down

0 comments on commit cd0022b

Please sign in to comment.