Ericsson / codechecker

CodeChecker is an analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy
https://codechecker.readthedocs.io
Apache License 2.0
2.15k stars 358 forks source link

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

Closed Szelethus closed 4 months ago

Szelethus commented 4 months ago

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.