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

Side by Side Diff: PRESUBMIT.py

Issue 11534010: Pass a list of strings rather than a string-as-list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Top-level presubmit script for Chromium. 5 """Top-level presubmit script for Chromium.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into gcl. 8 for more details about the presubmit API built into gcl.
9 """ 9 """
10 10
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 660
661 def _CheckHardcodedGoogleHostsInLowerLayers(input_api, output_api): 661 def _CheckHardcodedGoogleHostsInLowerLayers(input_api, output_api):
662 def FilterFile(affected_file): 662 def FilterFile(affected_file):
663 """Filter function for use with input_api.AffectedSourceFiles, 663 """Filter function for use with input_api.AffectedSourceFiles,
664 below. This filters out everything except non-test files from 664 below. This filters out everything except non-test files from
665 top-level directories that generally speaking should not hard-code 665 top-level directories that generally speaking should not hard-code
666 service URLs (e.g. src/android_webview/, src/content/ and others). 666 service URLs (e.g. src/android_webview/, src/content/ and others).
667 """ 667 """
668 return input_api.FilterSourceFile( 668 return input_api.FilterSourceFile(
669 affected_file, 669 affected_file,
670 white_list=('^(android_webview|base|content|net)[\\\/].*'), 670 white_list=('^(android_webview|base|content|net)[\\\/].*', ),
M-A Ruel 2012/12/11 15:03:47 Should use r''. You can use a list instead if you
671 black_list=(_EXCLUDED_PATHS + 671 black_list=(_EXCLUDED_PATHS +
672 _TEST_CODE_EXCLUDED_PATHS + 672 _TEST_CODE_EXCLUDED_PATHS +
673 input_api.DEFAULT_BLACK_LIST)) 673 input_api.DEFAULT_BLACK_LIST))
674 674
675 pattern = input_api.re.compile('"[^"]*google\.com[^"]*"') 675 pattern = input_api.re.compile('"[^"]*google\.com[^"]*"')
676 problems = [] # items are (filename, line_number, line) 676 problems = [] # items are (filename, line_number, line)
677 for f in input_api.AffectedSourceFiles(FilterFile): 677 for f in input_api.AffectedSourceFiles(FilterFile):
678 for line_num, line in f.ChangedContents(): 678 for line_num, line in f.ChangedContents():
679 if pattern.search(line): 679 if pattern.search(line):
680 problems.append((f.LocalPath(), line_num, line)) 680 problems.append((f.LocalPath(), line_num, line))
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 'win_aura', 872 'win_aura',
873 'win_rel', 873 'win_rel',
874 ] 874 ]
875 875
876 # Match things like path/aura/file.cc and path/file_aura.cc. 876 # Match things like path/aura/file.cc and path/file_aura.cc.
877 # Same for chromeos. 877 # Same for chromeos.
878 if any(re.search('[/_](aura|chromeos)', f) for f in files): 878 if any(re.search('[/_](aura|chromeos)', f) for f in files):
879 trybots += ['linux_chromeos_clang:compile', 'linux_chromeos_asan'] 879 trybots += ['linux_chromeos_clang:compile', 'linux_chromeos_asan']
880 880
881 return trybots 881 return trybots
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698