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

[fix] Missing analyzer error #4330

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

cservakt
Copy link
Collaborator

CodeChecker analyzers gives python error for the user if a supported analyzer is missing. In addition, CodeChecker analyze and check should have provided an error and sys.exit when the specified (with --analyzers) analyzer was missing.

With this PR, CodeChecker analyzers can give a warning message with NOT FOUND status if a supported analyzer can't be found on the machine.

In case of explicitly defined missing analyzer, the analyze and check command will be failed and will give warrning and error message for the user.

@cservakt cservakt added CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands bugfix 🔨 analyzer 📈 Related to the analyze commands (analysis driver) labels Aug 28, 2024
@cservakt cservakt added this to the release 6.24.1 milestone Aug 28, 2024
@cservakt cservakt requested a review from dkrupp August 28, 2024 10:51
@bruntib
Copy link
Contributor

bruntib commented Aug 28, 2024

How about having None as default value to args.analyzers? That could simplify the implementation, because that way we can distinguish these cases:

  • None: All analyzers are enabled implicitly. No error if some of them is not available.
  • [<all_analyzers_listed_here...>]: All analyzers are enabled explicitly. Error if some of them is not available.

@cservakt
Copy link
Collaborator Author

distinguish

Thank you for the suggestion. I also thought about it to use None as default for args.

`CodeChecker analyzers` gives python error for the user if a supported analyzer is missing. In addition, CodeChecker `analyze` and `check` should have provided an error and sys.exit when the specified (with `--analyzers`) analyzer was missing.

With this PR, `CodeChecker analyzers` can give a warning message with `NOT FOUND` status if a supported analyzer can't be found on the machine.

In case of explicitly defined missing analyzer, the `analyze` and `check` command will be failed and will give warrning and error message for the user.
@bruntib bruntib merged commit 99fcaf4 into Ericsson:master Aug 30, 2024
7 of 8 checks passed
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) bugfix 🔨 CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants