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

Unified Diff: presubmit_canned_checks.py

Issue 1449853002: depot_tools: make CheckLicense warn instead of notify (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 5 years, 1 month 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 | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index 5247f1dc982a3c83fdfafe6195dd1ba39dd796d3..3abdbb4992a1858e3f5bddd1312350c67fa34d49 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -419,11 +419,7 @@ def CheckLicense(input_api, output_api, license_re, source_file_filter=None,
if not license_re.search(contents):
bad_files.append(f.LocalPath())
if bad_files:
- if input_api.is_committing:
- res_type = output_api.PresubmitPromptWarning
- else:
- res_type = output_api.PresubmitNotifyResult
- return [res_type(
+ return [output_api.PresubmitPromptWarning(
'License must match:\n%s\n' % license_re.pattern +
'Found a bad license header in these files:', items=bad_files)]
return []
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698