Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: tools/checklicenses/checklicenses.py

Issue 7979030: Make it easier to remove path-specific whitelist entries (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/checklicenses/checklicenses.py
diff --git a/tools/checklicenses/checklicenses.py b/tools/checklicenses/checklicenses.py
index c5d27567091948cbcbba196b7ad1ddb1896016fe..9ca97a6cda3e935bd1def85c78fd177a36333e8a 100755
--- a/tools/checklicenses/checklicenses.py
+++ b/tools/checklicenses/checklicenses.py
@@ -18,6 +18,9 @@ def PrintUsage():
to the script file. This will be correct given the normal location
of the script in "<root>/tools/checklicenses".
+ --ignore-suppressions Ignores path-specific license whitelist. Useful when
+ trying to remove a suppression/whitelist entry.
+
tocheck Specifies the directory, relative to root, to check. This defaults
to "." so it checks everything.
@@ -494,14 +497,15 @@ def main(options, args):
if license in WHITELISTED_LICENSES:
continue
- found_path_specific = False
- for prefix in PATH_SPECIFIC_WHITELISTED_LICENSES:
- if (filename.startswith(prefix) and
- license in PATH_SPECIFIC_WHITELISTED_LICENSES[prefix]):
+ if not options.ignore_suppressions:
+ found_path_specific = False
+ for prefix in PATH_SPECIFIC_WHITELISTED_LICENSES:
+ if (filename.startswith(prefix) and
+ license in PATH_SPECIFIC_WHITELISTED_LICENSES[prefix]):
found_path_specific = True
break
- if found_path_specific:
- continue
+ if found_path_specific:
+ continue
print "'%s' has non-whitelisted license '%s'" % (filename, license)
success = False
@@ -532,5 +536,9 @@ if '__main__' == __name__:
'will normally be the repository root.')
option_parser.add_option('-v', '--verbose', action='store_true',
default=False, help='Print debug logging')
+ option_parser.add_option('--ignore-suppressions',
+ action='store_true',
+ default=False,
+ help='Ignore path-specific license whitelist.')
options, args = option_parser.parse_args()
main(options, args)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698