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

--file has no effect #4187

Open
tolikzinovyev opened this issue Mar 10, 2024 · 2 comments
Open

--file has no effect #4187

tolikzinovyev opened this issue Mar 10, 2024 · 2 comments
Labels
analyzer 📈 Related to the analyze commands (analysis driver)

Comments

@tolikzinovyev
Copy link

Describe the bug
--file flag has no effect when running analyze.

CodeChecker version
6.23.1

To Reproduce
Steps to reproduce the behaviour:

  1. git clone https://github.com/tolikzinovyev/codechecker
  2. cd codechecker
  3. bazel build //...
  4. bazel run @hedron_compile_commands//:refresh_all to generate compile_commands.json
  5. ~/.local/bin/CodeChecker analyze compile_commands.json -o ./report --analyzers clang-tidy --clean --file a.cc

Expected behaviour
Only a.cc is analyzed.

Desktop (please complete the following information)

  • OS: Arch Linux
  • Browser: not applicable
  • Version: rolling

Additional context

@bruntib
Copy link
Contributor

bruntib commented Mar 11, 2024

The --file flag must match the absolute path of files. Could you try this command?
~/.local/bin/CodeChecker analyze compile_commands.json -o ./report --analyzers clang-tidy --clean --file '*/a.cc'

@tolikzinovyev
Copy link
Author

It still analyzes both files.

[INFO 2024-03-11 20:46] - [1/2] clang-tidy analyzed a.cc successfully.
[INFO 2024-03-11 20:46] - [1/2] clang-tidy analyzed b.cc successfully.

@whisperity whisperity added the analyzer 📈 Related to the analyze commands (analysis driver) label Mar 18, 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)
Projects
None yet
Development

No branches or pull requests

3 participants