Index: PRESUBMIT.py |
diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
index 6ab44910877fbd05cbf94e12fb0af77f00cf777f..f16d273ab1d4f0e7caefc583f0e2dd3fc12dd973 100644 |
--- a/PRESUBMIT.py |
+++ b/PRESUBMIT.py |
@@ -669,6 +669,7 @@ def _CommonChecks(input_api, output_api): |
results.extend(_CheckNoAuraWindowPropertyHInHeaders(input_api, output_api)) |
results.extend(_CheckIncludeOrder(input_api, output_api)) |
results.extend(_CheckForVersionControlConflicts(input_api, output_api)) |
+ results.extend(_CheckPatchFiles(input_api, output_api)) |
if any('PRESUBMIT.py' == f.LocalPath() for f in input_api.AffectedFiles()): |
results.extend(input_api.canned_checks.RunUnitTestsInDirectory( |
@@ -752,6 +753,16 @@ def _CheckAuthorizedAuthor(input_api, output_api): |
return [] |
+def _CheckPatchFiles(input_api, output_api): |
+ problems = [f.LocalPath() for f in input_api.AffectedFiles() |
M-A Ruel
2012/12/05 19:39:22
In theory, you should put this one at +4 too on ne
enne (OOO)
2012/12/05 19:46:44
Oh? Are you suggesting to linebreak after the brac
M-A Ruel
2012/12/05 19:51:08
Actually, you are right it'd be +2, don't bother.
|
+ if f.LocalPath().endswith(('.orig', '.rej'))] |
+ if problems: |
+ return [output_api.PresubmitError( |
+ "Don't commit .rej and .orig files.", problems)] |
+ else: |
+ return [] |
+ |
+ |
def CheckChangeOnUpload(input_api, output_api): |
results = [] |
results.extend(_CommonChecks(input_api, output_api)) |