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

Side by Side Diff: chrome/PRESUBMIT.py

Issue 794243004: chrome: Cleanup some entries from presubmit's exclude list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« 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) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 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 """Presubmit script for changes affecting chrome/ 5 """Presubmit script for changes affecting chrome/
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 import re 11 import re
12 12
13 INCLUDE_CPP_FILES_ONLY = ( 13 INCLUDE_CPP_FILES_ONLY = (
14 r'.*\.cc$', r'.*\.h$' 14 r'.*\.cc$', r'.*\.h$'
15 ) 15 )
16 16
17 EXCLUDE = ( 17 EXCLUDE = (
18 # Objective C confuses everything. 18 # Objective C confuses everything.
19 r'.*cocoa.*', 19 r'.*cocoa.*',
20 r'.*_mac\.(cc|h)$', 20 r'.*_mac\.(cc|h)$',
21 r'.*_mac_.*', 21 r'.*_mac_.*',
22 # All the messages files do weird multiple include trickery 22 # All the messages files do weird multiple include trickery
23 r'.*_messages.*\.h$', 23 r'.*_messages.*\.h$',
24 r'render_messages.h$', 24 r'render_messages.h$',
25 # Autogenerated window resources files are off limits 25 # Autogenerated window resources files are off limits
26 r'.*resource.h$', 26 r'.*resource.h$',
27 # Header trickery 27 # Header trickery
28 r'.*-inl\.h$', 28 r'.*-inl\.h$',
29 # Templates
30 r'sigslotrepeater\.h$',
31 # GCC attribute trickery
32 r'sel_main\.cc$',
33 # Mozilla code
34 r'mork_reader\.h$',
35 r'mork_reader\.cc$',
36 r'nss_decryptor_linux\.cc$',
37 # Has safe printf usage that cpplint complains about 29 # Has safe printf usage that cpplint complains about
38 r'safe_browsing_util\.cc$', 30 r'safe_browsing_util\.cc$',
39 # Bogus ifdef tricks
40 r'renderer_webkitplatformsupport_impl\.cc$',
41 # Lines > 100 chars
42 r'gcapi\.cc$',
Lei Zhang 2014/12/12 01:53:00 gcapi.cc still exists, but I don't see any lines >
43 ) 31 )
44 32
45 def _CheckChangeLintsClean(input_api, output_api): 33 def _CheckChangeLintsClean(input_api, output_api):
46 """Makes sure that the chrome/ code is cpplint clean.""" 34 """Makes sure that the chrome/ code is cpplint clean."""
47 black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDE 35 black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDE
48 sources = lambda x: input_api.FilterSourceFile( 36 sources = lambda x: input_api.FilterSourceFile(
49 x, white_list=INCLUDE_CPP_FILES_ONLY, black_list=black_list) 37 x, white_list=INCLUDE_CPP_FILES_ONLY, black_list=black_list)
50 return input_api.canned_checks.CheckChangeLintsClean( 38 return input_api.canned_checks.CheckChangeLintsClean(
51 input_api, output_api, sources) 39 input_api, output_api, sources)
52 40
(...skipping 25 matching lines...) Expand all
78 def CheckChangeOnUpload(input_api, output_api): 66 def CheckChangeOnUpload(input_api, output_api):
79 results = [] 67 results = []
80 results.extend(_CommonChecks(input_api, output_api)) 68 results.extend(_CommonChecks(input_api, output_api))
81 results.extend(_CheckChangeLintsClean(input_api, output_api)) 69 results.extend(_CheckChangeLintsClean(input_api, output_api))
82 return results 70 return results
83 71
84 def CheckChangeOnCommit(input_api, output_api): 72 def CheckChangeOnCommit(input_api, output_api):
85 results = [] 73 results = []
86 results.extend(_CommonChecks(input_api, output_api)) 74 results.extend(_CommonChecks(input_api, output_api))
87 return results 75 return results
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