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

Unified Diff: PRESUBMIT.py

Issue 2511733005: Update shared library extension on AIX to .a. (Closed)
Patch Set: revert copyright change, update AUTHORS, fix presubmit checks Created 4 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
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index dde025383c327659198c00bb2e1368df24422e90..f6c8a357afe149a52c970e1be18e35b651d787c0 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -73,23 +73,15 @@ PYLINT_DISABLED_WARNINGS = [
]
-def CheckChangeOnUpload(input_api, output_api):
- report = []
- report.extend(input_api.canned_checks.PanProjectChecks(
- input_api, output_api))
- return report
-
-
-def CheckChangeOnCommit(input_api, output_api):
- report = []
-
+def _LicenseHeader(input_api):
# Accept any year number from 2009 to the current year.
current_year = int(input_api.time.strftime('%Y'))
allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1)))
+
years_re = '(' + '|'.join(allowed_years) + ')'
# The (c) is deprecated, but tolerate it until it's removed from all files.
- license = (
+ return (
r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n'
r'.*? Use of this source code is governed by a BSD-style license that '
r'can be\n'
@@ -98,8 +90,18 @@ def CheckChangeOnCommit(input_api, output_api):
'year': years_re,
}
+def CheckChangeOnUpload(input_api, output_api):
+ report = []
+ report.extend(input_api.canned_checks.PanProjectChecks(
+ input_api, output_api, license_header=_LicenseHeader(input_api)))
Dirk Pranke 2016/11/17 21:14:22 Apparently we were looking for difference licenses
+ return report
+
+
+def CheckChangeOnCommit(input_api, output_api):
+ report = []
+
report.extend(input_api.canned_checks.PanProjectChecks(
- input_api, output_api, license_header=license))
+ input_api, output_api, license_header=_LicenseHeader(input_api)))
report.extend(input_api.canned_checks.CheckTreeIsOpen(
input_api, output_api,
'http://gyp-status.appspot.com/status',
« no previous file with comments | « AUTHORS ('k') | pylib/gyp/generator/make.py » ('j') | pylib/gyp/generator/make.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698