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][fix] Unique lines when collecting statistics #3028

Merged
merged 1 commit into from
Nov 19, 2020

Conversation

baloghadamsoftware
Copy link

If a header file is included into multiple source files in a C code,
its lines are counted multiple times when processing the statistics.
This leads to false positives if e.g. the return value of a function
is used in a header but not in the source files. This patch fixes it
by collecting all lines to a set first and then processing the set.

If a header file is included into multiple source files in a C code,
its lines are counted multiple times when processing the statistics.
This leads to false positives if e.g. the return value of a function
is used in a header but not in the source files. This patch fixes it
by collecting all lines to a set first and then processing the set.
@baloghadamsoftware baloghadamsoftware added analyzer 📈 Related to the analyze commands (analysis driver) bugfix 🔨 labels Nov 17, 2020
Copy link
Contributor

@csordasmarton csordasmarton left a comment

Choose a reason for hiding this comment

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

It's LGTM!

@baloghadamsoftware baloghadamsoftware merged commit 075c8bb into Ericsson:master Nov 19, 2020
@csordasmarton csordasmarton added this to the release 6.15.1 milestone Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) bugfix 🔨
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants