-
Notifications
You must be signed in to change notification settings - Fork 388
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] Don't crash when diagtool is missing #4399
Conversation
I am getting a similar error: CodeChecker analyze ./compile_commands.json -o reports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some discussion starter comments
For clang-tidy the set of warnings can be queried by a tool named `diagtool`. In some environments `clang` is a symlink to `ccache`. Since CodeChecker tries to find `diagtool` right next to clang, this logic doesn't work, since `diagtool` is usually not next to `ccache`. In this patch CodeChecker searches `diagtool` in the next element of `PATH` environment variable in case `clang` is a symlink to `ccache`, since `ccache` would do the same, too. Fixes Ericsson#4371
1daa616
to
8717583
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, some else must approve.
For clang-tidy the set of warnings can be queried by a tool named
diagtool
. In some environmentsclang
is a symlink toccache
. Since CodeChecker tries to finddiagtool
right next to clang, this logic doesn't work, sincediagtool
is usually not next toccache
.In this patch CodeChecker searches
diagtool
in the next element ofPATH
environment variable in caseclang
is a symlink toccache
, sinceccache
would do the same, too.Fixes #4371