Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refs #12348 - fixed missing parsing of markup files when a build dir is specified #6577

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/cppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string

try {
if (mSettings.library.markupFile(file.spath())) {
if (mUnusedFunctionsCheck && mSettings.useSingleJob() && mSettings.buildDir.empty()) {
if (mUnusedFunctionsCheck && (mSettings.useSingleJob() || !mSettings.buildDir.empty())) {
// this is not a real source file - we just want to tokenize it. treat it as C anyways as the language needs to be determined.
Tokenizer tokenizer(mSettings, *this);
// enforce the language since markup files are special and do not adhere to the enforced language
Expand All @@ -661,6 +661,7 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
tokenizer.list.createTokens(in, file.spath());
}
mUnusedFunctionsCheck->parseTokens(tokenizer, mSettings);
// TODO: set analyzer information
}
return EXIT_SUCCESS;
}
Expand Down
Loading