Skip to content

Commit

Permalink
Fix duplicate findtoken.h in lib/cppcheck.vcxproj (#7193)
Browse files Browse the repository at this point in the history
Co-authored-by: Oliver Stöneberg <[email protected]>
  • Loading branch information
chrchr-github and firewave authored Jan 8, 2025
1 parent 48171bc commit 01b6141
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 26 deletions.
1 change: 0 additions & 1 deletion lib/cppcheck.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@
<ClInclude Include="errortypes.h" />
<ClInclude Include="filesettings.h" />
<ClInclude Include="findtoken.h" />
<ClInclude Include="findtoken.h" />
<ClInclude Include="forwardanalyzer.h" />
<ClInclude Include="fwdanalysis.h" />
<ClInclude Include="importproject.h" />
Expand Down
48 changes: 23 additions & 25 deletions tools/dmake/dmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,28 +461,27 @@ int main(int argc, char **argv)
}

// TODO: add files without source via parsing
std::vector<std::string> libfiles_h;
std::set<std::string> libfiles_h;
for (const std::string &libfile : libfiles) {
std::string fname(libfile.substr(4));
fname.erase(fname.find(".cpp"));
libfiles_h.emplace_back(fname + ".h");
libfiles_h.emplace(fname + ".h");
}
libfiles_h.emplace_back("analyzer.h");
libfiles_h.emplace_back("calculate.h");
libfiles_h.emplace_back("config.h");
libfiles_h.emplace_back("filesettings.h");
libfiles_h.emplace_back("findtoken.h");
libfiles_h.emplace_back("json.h");
libfiles_h.emplace_back("matchcompiler.h");
libfiles_h.emplace_back("precompiled.h");
libfiles_h.emplace_back("smallvector.h");
libfiles_h.emplace_back("sourcelocation.h");
libfiles_h.emplace_back("tokenrange.h");
libfiles_h.emplace_back("valueptr.h");
libfiles_h.emplace_back("version.h");
libfiles_h.emplace_back("vf_analyze.h");
libfiles_h.emplace_back("xml.h");
std::sort(libfiles_h.begin(), libfiles_h.end());
libfiles_h.emplace("analyzer.h");
libfiles_h.emplace("calculate.h");
libfiles_h.emplace("config.h");
libfiles_h.emplace("filesettings.h");
libfiles_h.emplace("findtoken.h");
libfiles_h.emplace("json.h");
libfiles_h.emplace("matchcompiler.h");
libfiles_h.emplace("precompiled.h");
libfiles_h.emplace("smallvector.h");
libfiles_h.emplace("sourcelocation.h");
libfiles_h.emplace("tokenrange.h");
libfiles_h.emplace("valueptr.h");
libfiles_h.emplace("version.h");
libfiles_h.emplace("vf_analyze.h");
libfiles_h.emplace("xml.h");

std::vector<std::string> clifiles_h;
for (const std::string &clifile : clifiles) {
Expand All @@ -493,13 +492,12 @@ int main(int argc, char **argv)
clifiles_h.emplace_back(fname + ".h");
}

std::vector<std::string> testfiles_h;
testfiles_h.emplace_back("fixture.h");
testfiles_h.emplace_back("helpers.h");
testfiles_h.emplace_back("options.h");
testfiles_h.emplace_back("precompiled.h");
testfiles_h.emplace_back("redirect.h");
std::sort(testfiles_h.begin(), testfiles_h.end());
std::set<std::string> testfiles_h;
testfiles_h.emplace("fixture.h");
testfiles_h.emplace("helpers.h");
testfiles_h.emplace("options.h");
testfiles_h.emplace("precompiled.h");
testfiles_h.emplace("redirect.h");

// TODO: write filter files
// Visual Studio projects
Expand Down

0 comments on commit 01b6141

Please sign in to comment.