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

Unified Diff: presubmit_canned_checks.py

Issue 7030023: Improve the sources regexp to be more correct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 7 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 | « no previous file | presubmit_support.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 11cdeb1570a60cb68aedde54eb7405d9a8275333..1e6421165766fbbedaafc6f412fa7e5c8d94558b 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -886,8 +886,8 @@ def PanProjectChecks(input_api, output_api,
"""
excluded_paths = excluded_paths or tuple()
text_files = text_files or (
- r'.*\.txt',
- r'.*\.json',
+ r'.+\.txt$',
+ r'.+\.json$',
)
project_name = project_name or 'Chromium'
license_header = license_header or (
@@ -909,9 +909,8 @@ def PanProjectChecks(input_api, output_api,
black_list = input_api.DEFAULT_BLACK_LIST + excluded_paths
white_list = input_api.DEFAULT_WHITE_LIST + text_files
sources = lambda x: input_api.FilterSourceFile(x, black_list=black_list)
- text_files = lambda x: input_api.FilterSourceFile(x, black_list=black_list,
- white_list=white_list)
-
+ text_files = lambda x: input_api.FilterSourceFile(
+ x, black_list=black_list, white_list=white_list)
snapshot_memory = []
def snapshot(msg):
« no previous file with comments | « no previous file | presubmit_support.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698