From 78ef23f0d20855acad466abd13a489828d30eb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Fri, 5 Aug 2016 13:37:39 +0100 Subject: checklicenses.py: Whitelist some plaintext files without license requirements Change-Id: I029ef1d52ac6edd44c0bac41adb86361ddd94272 Reviewed-on: https://code.wireshark.org/review/16898 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- tools/checklicenses.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tools/checklicenses.py') 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 -- cgit v1.2.1