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):
if success:
print "\nSUCCESS\n"
unused_suppressions = set(
PATH_SPECIFIC_WHITELISTED_LICENSES.keys()).difference(used_suppressions)
if unused_suppressions:
print "\nNOTE: unused suppressions detected:\n"
print '\n'.join(unused_suppressions)
if not len(args):
unused_suppressions = set(
PATH_SPECIFIC_WHITELISTED_LICENSES.keys()).difference(used_suppressions)
if unused_suppressions:
print "\nNOTE: unused suppressions detected:\n"
print '\n'.join(unused_suppressions)
return 0
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