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

Unified Diff: PRESUBMIT.py

Issue 6004006: Fix path filtering to be on the relative path and no on the absolute path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: added comment Created 10 years 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 | presubmit_canned_checks.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index d4730789c65969c492becac01c542535d461d1ca..343320fbc90e2e15a26569f177ebd48244b0b172 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -21,15 +21,27 @@ UNIT_TESTS = [
def CommonChecks(input_api, output_api):
output = []
+ # Verify that LocalPath() is local, e.g.:
+ # os.path.join(PresubmitLocalPath(), LocalPath()) == AbsoluteLocalPath()
+ for i in input_api.AffectedFiles():
+ if (input_api.os_path.join(input_api.PresubmitLocalPath(), i.LocalPath()) !=
+ i.AbsoluteLocalPath()):
+ output.append(output_api.PresubmitError('Path inconsistency'))
+ # Return right away because it needs to be fixed first.
+ return output
+
output.extend(input_api.canned_checks.RunPythonUnitTests(
input_api,
output_api,
UNIT_TESTS))
output.extend(WasGitClUploadHookModified(input_api, output_api))
- white_list = [r'.*\.py$', r'.*git-try$']
+ white_list = [r'.*\.py$', r'^git-try$']
black_list = list(input_api.DEFAULT_BLACK_LIST) + [
- r'.*cpplint\.py$', r'.*git_cl\/.*']
+ r'^cpplint\.py$',
+ r'^git_cl[\/\\].*',
+ r'^git_cl_repo[\/\\].*',
+ r'^git_cl[\/\\]test[\/\\]rietveld.*']
output.extend(input_api.canned_checks.RunPylint(
input_api,
output_api,
« no previous file with comments | « no previous file | presubmit_canned_checks.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698