-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[analyzer] Add the 'executable' config to all analyzers
By default, we look for clang, clang-tidy, gcc, etc. These binaries (and compilers in general) are notorious for having their version number in the binary name, making it difficult to run clang++-16 instead of clang++. Its not impossible, but really inconvenient, hence this patch. We debated a few approaches to this (including a CodeChecker-wide option called --analyzer-binary, that could havve been used like this: --analyzer-binary clangsa:/usr/bin/clang-16 We decided that since not all analyzers might have an executable binary (like pylint), we shouldn't commit to this naming. We also decided that this is a flag that should be implemented by individual analyzer plugins. The PR adds the 'executable' config to all currently supported analyzers. I also needed to make adjustments to `CodeChecker analyzers`, since the new config must be visible, even if we couldn't get hold of an analyzer binary that we support. The list of changes: * Deprecate both `--all` and `--details`, because they were more confusing than useful * We list all supported (not available) analyzers by default, but print a warning message when its not available. * We used to query the version of each analyzer binary in a uniform way, but clang, cppcheck, gcc prints their version using different flags, and in different formats. I changed this to call the analyzer plugins' get_binary_version method (which I also implemented in this patch). I don't like enlarging patches too much, but this is how the PR turned out. Its honestly not my proudest work (you can only do so much in so little time), but I think the interface is fine, even if the implementation can use a little improvement. Closes #3898.
- Loading branch information
Showing
8 changed files
with
142 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.