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

Side by Side Diff: PRESUBMIT.py

Issue 9692059: Make presubmit ignore files that end in _autogen.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 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
11 11
12 import re 12 import re
13 13
14 14
15 _EXCLUDED_PATHS = ( 15 _EXCLUDED_PATHS = (
16 r"^breakpad[\\\/].*", 16 r"^breakpad[\\\/].*",
17 r"^native_client_sdk[\\\/].*", 17 r"^native_client_sdk[\\\/].*",
18 r"^net[\\\/]tools[\\\/]spdyshark[\\\/].*", 18 r"^net[\\\/]tools[\\\/]spdyshark[\\\/].*",
19 r"^skia[\\\/].*", 19 r"^skia[\\\/].*",
20 r"^v8[\\\/].*", 20 r"^v8[\\\/].*",
21 r".*MakeFile$", 21 r".*MakeFile$",
22 r".+_autogen\.h$",
22 ) 23 )
23 24
24 25
25 _TEST_ONLY_WARNING = ( 26 _TEST_ONLY_WARNING = (
26 'You might be calling functions intended only for testing from\n' 27 'You might be calling functions intended only for testing from\n'
27 'production code. It is OK to ignore this warning if you know what\n' 28 'production code. It is OK to ignore this warning if you know what\n'
28 'you are doing, as the heuristics used to detect the situation are\n' 29 'you are doing, as the heuristics used to detect the situation are\n'
29 'not perfect. The commit queue will not block on this warning.\n' 30 'not perfect. The commit queue will not block on this warning.\n'
30 'Email joi@chromium.org if you have questions.') 31 'Email joi@chromium.org if you have questions.')
31 32
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 for non_android_re in (aura_re, win_re): 332 for non_android_re in (aura_re, win_re):
332 if all(re.search(non_android_re, f) for f in affected_files): 333 if all(re.search(non_android_re, f) for f in affected_files):
333 possibly_android = False 334 possibly_android = False
334 break 335 break
335 if possibly_android: 336 if possibly_android:
336 for f in change.AffectedFiles(): 337 for f in change.AffectedFiles():
337 if any(re.search(r, f.LocalPath()) for r in android_re_list): 338 if any(re.search(r, f.LocalPath()) for r in android_re_list):
338 preferred.append('android') 339 preferred.append('android')
339 break 340 break
340 return preferred 341 return preferred
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