summaryrefslogtreecommitdiffstats
path: root/android_webview/tools/webview_licenses.py
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-29 21:04:50 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-29 21:04:50 +0000
commit7c80c11dc1ae2a886b3d6759d41bd04c9be7a60a (patch)
tree506d887b8d68b216fc85cc0e64679912b3cd450a /android_webview/tools/webview_licenses.py
parentdf48884f422dcedbd68152594a66a97bf726cc85 (diff)
downloadchromium_src-7c80c11dc1ae2a886b3d6759d41bd04c9be7a60a.zip
chromium_src-7c80c11dc1ae2a886b3d6759d41bd04c9be7a60a.tar.gz
chromium_src-7c80c11dc1ae2a886b3d6759d41bd04c9be7a60a.tar.bz2
Cleanup stale files from android_webview license check.
Also check for missing files in the white list. NOTRY=true Review URL: https://codereview.chromium.org/301903002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273593 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/tools/webview_licenses.py')
-rwxr-xr-xandroid_webview/tools/webview_licenses.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/android_webview/tools/webview_licenses.py b/android_webview/tools/webview_licenses.py
index 9f8b3f7..d2775e7 100755
--- a/android_webview/tools/webview_licenses.py
+++ b/android_webview/tools/webview_licenses.py
@@ -180,10 +180,14 @@ def _CheckLicenseHeaders(excluded_dirs_list, whitelisted_files):
print 'The following files are whitelisted unnecessarily. You must ' \
'remove the following files from the whitelist.\n%s' % \
'\n'.join(sorted(stale))
+ missing = [f for f in whitelisted_files if not os.path.exists(f)]
+ if missing:
+ print 'The following files are whitelisted, but do not exist.\n%s' % \
+ '\n'.join(sorted(missing))
if unknown:
return ScanResult.Errors
- elif stale:
+ elif stale or missing:
return ScanResult.Warnings
else:
return ScanResult.Ok