Skip to content
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

[server] Set analyzer name for clang-diagnostic checkers #2956

Merged

Conversation

csordasmarton
Copy link
Contributor

Checkers that start with clang-diagnostic- are compiler warnings and these
are not in the metadata.json file when storing results. We didn't handle this
use case so we were not able to set analyzer names for these checkers previously.
This commits solves this problem and set the analyzer name field for these
checkers too.

Checkers that start with `clang-diagnostic-` are compiler warnings and these
are not in the metadata.json file when storing results. We didn't handle this
use case so we were not able to set analyzer names for these checkers previously.
This commits solves this problem and set the analyzer name field for these
checkers too.
@@ -2511,6 +2511,9 @@ def get_analyzer_name(report):
if report.metadata:
return report.metadata.get("analyzer", {}).get("name")

if report.check_name.startswith('clang-diagnostic-'):
return 'clang-tidy'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add some default case if non of the above return some analyzer name? Something like unknown analyzer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default if this field is not set it will be 'unknown':

analyzer_name = Column(String,
nullable=False,
server_default="unknown")

@csordasmarton csordasmarton requested a review from gyorb October 5, 2020 07:45
@gyorb gyorb merged commit f3574a3 into Ericsson:master Oct 12, 2020
@csordasmarton csordasmarton deleted the set_analyzer_name_for_clang_warnings branch November 6, 2020 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants