Skip to content

Commit

Permalink
CppCheck: actually generate analyzer information for markup files
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Oct 25, 2024
1 parent 837c5cb commit 62f3731
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 5 additions & 1 deletion lib/cppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,12 @@ unsigned int CppCheck::checkFile(const FileWithDetails& file, const std::string
}
mUnusedFunctionsCheck->parseTokens(tokenizer, mSettings);

// TODO: open file so we can set the fileinfo
// TODO: how to get the proper tokenlist to generate the proper hash?
const std::size_t hash = time(nullptr); // calculateHash(tokenizer.list, mSettings);
std::list<ErrorMessage> errors;
mAnalyzerInformation.analyzeFile(mSettings.buildDir, file.spath(), cfgname, hash, errors);
mAnalyzerInformation.setFileInfo("CheckUnusedFunctions", mUnusedFunctionsCheck->analyzerInfo());
mAnalyzerInformation.close();
}
return EXIT_SUCCESS;
}
Expand Down
2 changes: 0 additions & 2 deletions test/cli/qml_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def test_unused_functions_j():
assert ret == 0, stdout


# TODO: fillSampleData is not unused
@pytest.mark.xfail(strict=True)
def test_unused_functions_builddir(tmpdir):
build_dir = os.path.join(tmpdir, 'b1')
os.mkdir(build_dir)
Expand Down

0 comments on commit 62f3731

Please sign in to comment.