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

Unified Diff: catapult_build/repo_checks.py

Issue 1729313002: Remove ".orig" files and add a check to presubmit (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: Generate a single presubmit error message Created 4 years, 10 months 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 | « PRESUBMIT.py ('k') | third_party/Paste/README.chromium » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: catapult_build/repo_checks.py
diff --git a/catapult_build/repo_checks.py b/catapult_build/repo_checks.py
new file mode 100644
index 0000000000000000000000000000000000000000..8fc765a88ee0037507ead45ae75d35b1d73fb688
--- /dev/null
+++ b/catapult_build/repo_checks.py
@@ -0,0 +1,17 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Checks to use in PRESUBMIT.py for general repository violations."""
+
+
+def RunChecks(input_api, output_api):
+ orig_files = [f.LocalPath()
+ for f in input_api.AffectedFiles(include_deletes=False)
+ if f.LocalPath().endswith('.orig')]
+ if orig_files:
+ return [output_api.PresubmitError(
+ 'Files with ".orig" suffix must not be checked into the '
+ 'repository:\n ' + '\n '.join(orig_files))]
+ else:
+ return []
« no previous file with comments | « PRESUBMIT.py ('k') | third_party/Paste/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698