-
Notifications
You must be signed in to change notification settings - Fork 385
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
Command line deduplication #1517
Conversation
d93acfa
to
80c65b2
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.
Please add a unit test for get_report_path_hash
libcodechecker/util.py
Outdated
@@ -590,3 +590,24 @@ def trim_path_prefixes(path, prefixes): | |||
return path | |||
|
|||
return path[len(longest_matching_prefix):] | |||
|
|||
|
|||
def get_report_path_hash(report, files): |
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.
I think it would be better to put this into libcodechecker/report.py
so every report related function is there. It could be a static method of the Report class there.
80c65b2
to
c89b8c6
Compare
libcodechecker/libhandlers/parse.py
Outdated
@@ -158,7 +158,8 @@ def arg_match(options): | |||
parser.set_defaults(func=__handle) | |||
|
|||
|
|||
def parse(f, context, metadata_dict, suppress_handler, skip_handler, steps): | |||
def parse(f, context, metadata_dict, suppress_handler, skip_handler, | |||
processed_path_hashes, steps): |
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.
I would prefer to extend the function arguments at the end if possible. It is really easy to mix up different type of arguments in python.
@@ -147,6 +146,27 @@ def compare_ctrl_sections(curr, prev): | |||
return '' | |||
|
|||
|
|||
def get_report_path_hash(report, files): |
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.
Please add function documentation.
c89b8c6
to
1cfae29
Compare
In the command line (diff and print commands ) the results in the same header files should be shown and counted only once even if they were found multiple times because multiple c/cpp files included them.
1cfae29
to
bc1da80
Compare
In the command line (diff and print commands ) the results in the same header files should be shown and counted only once even if they were found multiple times because multiple c/cpp files included them.
Closes #1465 and Closes #1512.