You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Clang's location can be configured in config/package_layout.json. In some environments it's not possible to edit this file, because CodeChecker is installed to a read-only filesystem. It is not a good practice anyways to provide an analyzer's location in a config file. Configuration conventionally happens through environment variables, command line flags, etc.
Similar to CC and CXX environment variables of some build systems it should be possible in CodeChecker to configure analyzers' location.
A discussion about this issue can be found here: #3869.
The text was updated successfully, but these errors were encountered:
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.
ClosesEricsson#3898.
Currently the Clang's location can be configured in
config/package_layout.json
. In some environments it's not possible to edit this file, because CodeChecker is installed to a read-only filesystem. It is not a good practice anyways to provide an analyzer's location in a config file. Configuration conventionally happens through environment variables, command line flags, etc.Similar to CC and CXX environment variables of some build systems it should be possible in CodeChecker to configure analyzers' location.
A discussion about this issue can be found here: #3869.
The text was updated successfully, but these errors were encountered: