Skip to content

Commit

Permalink
Simplify only-findings codebase.walk #685 #357
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Ombredanne <[email protected]>
  • Loading branch information
pombredanne committed Jan 23, 2018
1 parent cefb0f6 commit 92de6c6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/scancode/plugin_only_findings.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ def process_codebase(self, codebase, **kwargs):
not have findings e.g. if they have no scan data (excluding info) and no
errors.
"""
resources = codebase.walk(topdown=True, skip_filtered=True)
for resource in resources:
for resource in codebase.walk():
if not has_findings(resource):
resource.is_filtered = True

Expand All @@ -64,4 +63,4 @@ def has_findings(resource):
"""
Return True if this resource has findings.
"""
return bool(resource.errors or resource.get_scans().values())
return bool(resource.errors or any(resource.get_scans().values()))

0 comments on commit 92de6c6

Please sign in to comment.