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

[analyzer] Create new diagnostic message hash #3402

Merged

Conversation

csordasmarton
Copy link
Contributor

Closes #3397

Create a new hash that contains the messages on the report path.

This report hash will contain the similar information as the
context-free-v2 hash + bug step messages:

  • file_name from the main diag section.
  • checker message.
  • line content from the source file if can be read up. All the whitespaces from the source content are removed.
  • column numbers from the main diag sections location.
  • bug step messages.

Copy link
Contributor

@martong martong left a comment

Choose a reason for hiding this comment

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

First of all, thanks for this change Marci, great work!

I was wondering if it would be possible to generate and store both the context-free-v2 and the diagnostic-message hashes for a bugreport? The reason I am asking is that we might not know during the analysis time based on which hash we are going to browse the reports.

What's more, it would be really useful to list in a differential view all those bugs that have the same context-free-v2 but a different diagnostic-message hash. Actually, I think this is the real use case we want to achieve. Because we want the possibility to show how a checker's messaging changed/evolved with a patch.

analyzer/codechecker_analyzer/cmd/analyze.py Show resolved Hide resolved
docs/analyzer/report_identification.md Show resolved Hide resolved
Create a new hash that contains the messages on the report path.

This report hash will contain the similar information as the
`context-free-v2` hash + bug step messages:

- file_name from the main diag section.
- checker message.
- line content from the source file if can be read up. All the whitespaces from the source content are removed.
- column numbers from the main diag sections location.
- bug step messages.
@csordasmarton csordasmarton force-pushed the diagnostic_message_hash branch from e54abe6 to 6e9d946 Compare August 19, 2021 12:24
@csordasmarton csordasmarton requested a review from martong August 19, 2021 12:24
@martong
Copy link
Contributor

martong commented Aug 19, 2021

First of all, thanks for this change Marci, great work!

I was wondering if it would be possible to generate and store both the context-free-v2 and the diagnostic-message hashes for a bugreport? The reason I am asking is that we might not know during the analysis time based on which hash we are going to browse the reports.

What's more, it would be really useful to list in a differential view all those bugs that have the same context-free-v2 but a different diagnostic-message hash. Actually, I think this is the real use case we want to achieve. Because we want the possibility to show how a checker's messaging changed/evolved with a patch.

As we discussed, the new hash in itself is enough to have this kind of diff that I want, so there is no need to have multiple hashes stored.

Copy link
Contributor

@martong martong left a comment

Choose a reason for hiding this comment

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

LGTM!

@csordasmarton csordasmarton merged commit 5aec531 into Ericsson:master Sep 2, 2021
@csordasmarton csordasmarton deleted the diagnostic_message_hash branch January 28, 2022 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a new hash that contains the messages on the report path
2 participants