Skip to content

Commit

Permalink
Merge pull request Ericsson#662 from whisperity/fix_suppress
Browse files Browse the repository at this point in the history
Fix suppress feature in parse broken by plist_parser refactoring
  • Loading branch information
gyorb authored Jun 13, 2017
2 parents 69837a5 + f3ec026 commit 776ff71
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@ def __print_bugs(self, reports, files):
LOG.debug(report + ' is skipped (in ' + f_path + ")")
continue

bug = {'hash_value':
report.main['issue_hash_content_of_line_in_context'],
'file_path': f_path
}
if self.suppress_handler and \
self.suppress_handler.get_suppressed(report):
LOG.debug(report + " is suppressed by suppress file.")
self.suppress_handler.get_suppressed(bug):
LOG.debug("Suppressed by suppress file: {0}".format(report))
continue

last_report_event = report.bug_path[-1]
Expand Down
4 changes: 2 additions & 2 deletions libcodechecker/generic_package_suppress_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ def remove_suppress_bug_id(self, bug_id, file_name):
def get_suppressed(self, bug):

return any([suppress for suppress in self.__suppress_info
if suppress[0] == bug.hash_value and
suppress[1] == os.path.basename(bug.file_path)])
if suppress[0] == bug['hash_value'] and
suppress[1] == os.path.basename(bug['file_path'])])
1 change: 1 addition & 0 deletions libcodechecker/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"""
import hashlib
import json
import linecache
import os

Expand Down

0 comments on commit 776ff71

Please sign in to comment.