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

CodeChecker analyze skip does not work if the file location is relative in the compilation db #4223

Closed
dkrupp opened this issue Apr 17, 2024 · 0 comments · Fixed by #4227
Closed
Labels
analyzer 📈 Related to the analyze commands (analysis driver) bug 🐛

Comments

@dkrupp
Copy link
Member

dkrupp commented Apr 17, 2024

When the --file parameter is referred with an absolute path, but the compilation database contains the file as a relative path to the directory member e.g. tests/FLP37-C-A.c in this example the file is not recognized.

Reproduction:
Compilation db:

[{
		"directory": "/workspace/sei_cert_test_suite/cpp",
		"command": "/usr/bin/gcc -Itests -c tests/FLP37-C-A.c -o obj/FLP37-C-A.o",
		"file": "tests/FLP37-C-A.c"
}]
CodeChecker analyze --output /local/workspace/sei_cert_test_suite/.codechecker/reports /local/workspace/sei_cert_test_suite/cpp/compile_commands.json --file /local/workspace/sei_cert_test_suite/cpp/tests/FLP37-C-A.c --analyzers clang-tidy clangsa -e cert
[INFO 2024-04-17 14:31] - No analysis is required.
There were no compilation commands in the provided compilation database or all of them were skipped.
>>> Process 'CodeChecker analyze' exited with code 0
@dkrupp dkrupp added this to the release 6.24.0 milestone Apr 17, 2024
@whisperity whisperity added the analyzer 📈 Related to the analyze commands (analysis driver) label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) bug 🐛
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants