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

Function getCppFiles

tools/dmake/dmake.cpp:169–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169static std::string getCppFiles(std::vector<std::string> &files, const std::string &path, bool recursive)
170{
171 std::list<FileWithDetails> filelist;
172 const std::set<std::string> extra;
173 const std::vector<std::string> masks;
174 const PathMatch matcher(masks, Path::getCurrentPath());
175 std::string err = FileLister::addFiles(filelist, path, extra, recursive, matcher);
176 if (!err.empty())
177 return err;
178
179 // add *.cpp files to the "files" vector..
180 for (const auto& file : filelist) {
181 if (endsWith(file.path(), ".cpp"))
182 files.push_back(file.path());
183 }
184 return "";
185}
186
187
188static void makeConditionalVariable(std::ostream &os, const std::string &variable, const std::string &defaultValue)

Callers 1

mainFunction · 0.85

Calls 3

endsWithFunction · 0.50
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected