Commit 554803b6 authored by thestig@chromium.org's avatar thestig@chromium.org

checklicenses: Do not report unused suppressions when checking a sub-directory.

In this case, it's not very useful and full of false positives.
NOTRY=true

Review URL: https://codereview.chromium.org/293843002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271711 0039d316-1c4b-4281-b951-d872f2087c98
parent a457da86
...@@ -460,11 +460,12 @@ def check_licenses(options, args): ...@@ -460,11 +460,12 @@ def check_licenses(options, args):
if success: if success:
print "\nSUCCESS\n" print "\nSUCCESS\n"
unused_suppressions = set( if not len(args):
PATH_SPECIFIC_WHITELISTED_LICENSES.keys()).difference(used_suppressions) unused_suppressions = set(
if unused_suppressions: PATH_SPECIFIC_WHITELISTED_LICENSES.keys()).difference(used_suppressions)
print "\nNOTE: unused suppressions detected:\n" if unused_suppressions:
print '\n'.join(unused_suppressions) print "\nNOTE: unused suppressions detected:\n"
print '\n'.join(unused_suppressions)
return 0 return 0
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment