-
Notifications
You must be signed in to change notification settings - Fork 371
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
[bugfix] Crash with intercept-build based compilation database #3685
Conversation
9e6b87c
to
9314258
Compare
946640f
to
9acc82c
Compare
@@ -851,6 +852,22 @@ def __get_result_source_files(metadata): | |||
return result_src_files | |||
|
|||
|
|||
def __transform_compile_commands(compile_commands): |
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.
With respect, you could've named this function process_compile_commands
, reparse_compilation_database
, adjust_compcoms
, or simply function_234534_by_bruntib
. :)
How about we call this change_args_to_command_in_comp_db
or something more specific?
""" | ||
In CodeChecker we support compilation databases where the JSON object of a | ||
build action contains "file", "directory" and "command" fields. However, | ||
compilation databases from intercept build are contan "arguments" instead |
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.
compilation databases from intercept build are contan "arguments" instead | |
compilation databases from intercept build are contain "arguments" instead |
When compilation database is generated by intercept build then a build action in this JSON file contains "arguments" field instead of "command" which is a list of command-line arguments instead of a single string. CodeChecker supports only "command" field, so this transformation must be done in "CodeChecker analyze" command in order to avoid failure when building SkipHandler with "--file <header_file>" flag. Fixes Ericsson#3683
9acc82c
to
d8b5edd
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
When compilation database is generated by intercept build then a build
action in this JSON file contains "arguments" field instead of "command"
which is a list of command-line arguments instead of a single string.
CodeChecker supports only "command" field, so this transformation must
be done in "CodeChecker analyze" command in order to avoid failure
when building SkipHandler with "--file <header_file>" flag.
Fixes #3683