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

[gcc] Don't emit a missing gcc warning if no checkers are enabled #4179

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

Szelethus
Copy link
Collaborator

Currently, no gcc checkers are enabled by default, which can make this warning rather annoying:

CodeChecker analyze ./compile_commands.json -o reports_test
[WARNING 2024-01-08 14:56] - Analyzer 'gcc' is enabled but CodeChecker is failed to execute analysis with it: 'Incompatible version: GCC binary found is too old at v9.4.0; minimum version is 13.0.0. Maybe try setting an absolute path to a different analyzer binary via the env variable CC_ANALYZER_BIN?'. Please check your 'PATH' environment variable and the 'config/package_layout.json' file!

...even though no checkers were explicitly enabled for gcc. This patch fixes this by disregarding non-functional analyzers if no checkers are enabled for them anyway.

@Szelethus Szelethus added bugfix 🔨 gcc 🐃 GNU GCC Static Analyzer labels Mar 4, 2024
@Szelethus Szelethus added this to the release 6.24.0 milestone Mar 4, 2024
@bruntib bruntib merged commit fa1d14f into Ericsson:master Mar 5, 2024
8 checks passed
Szelethus added a commit to Szelethus/codechecker that referenced this pull request May 8, 2024
Original patch (that itroduces the crash):
Ericsson#4179
Revert attempt in Ericsson#4238.

The crash occurs because the original patch tries to create config
handlers even if they are not supported. This is playing with fire
already, but the crash occured when not even the analyzer binary is
found.

In this patch, these analyzers are skipped from checking if they have
any checkers enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix 🔨 gcc 🐃 GNU GCC Static Analyzer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants