summaryrefslogtreecommitdiff
path: root/tools/checklicenses.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/checklicenses.py')
-rwxr-xr-xtools/checklicenses.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/checklicenses.py b/tools/checklicenses.py
index 39b1b6dfa2..e7510c08d4 100755
--- a/tools/checklicenses.py
+++ b/tools/checklicenses.py
@@ -218,6 +218,15 @@ PATH_SPECIFIC_WHITELISTED_LICENSES = {
],
}
+WHITELISTED_UNKNOWN_FILES_BY_NAME = [
+ 'AUTHORS',
+ 'COPYING',
+ 'ChangeLog',
+ 'NEWS',
+ 'README',
+ 'TODO'
+]
+
def check_licenses(options, args):
# Figure out which directory we have to check.
@@ -293,6 +302,12 @@ def check_licenses(options, args):
if found_path_specific:
continue
+ if not options.ignore_suppressions:
+ if license == 'UNKNOWN':
+ fbase = os.path.basename(filename)
+ if fbase in WHITELISTED_UNKNOWN_FILES_BY_NAME:
+ continue
+
print("'%s' has non-whitelisted license '%s'" % (filename, license))
success = False