OLD | NEW |
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 |
(...skipping 20 matching lines...) Expand all Loading... |
31 # Templates | 31 # Templates |
32 r'sigslotrepeater\.h$', | 32 r'sigslotrepeater\.h$', |
33 # GCC attribute trickery | 33 # GCC attribute trickery |
34 r'sel_main\.cc$', | 34 r'sel_main\.cc$', |
35 # Mozilla code | 35 # Mozilla code |
36 r'mork_reader\.h$', | 36 r'mork_reader\.h$', |
37 r'mork_reader\.cc$', | 37 r'mork_reader\.cc$', |
38 r'nss_decryptor_linux\.cc$', | 38 r'nss_decryptor_linux\.cc$', |
39 # Has safe printf usage that cpplint complains about | 39 # Has safe printf usage that cpplint complains about |
40 r'safe_browsing_util\.cc$', | 40 r'safe_browsing_util\.cc$', |
41 # Too much math on one line? | |
42 r'bloom_filter\.cc$', | |
43 # Bogus ifdef tricks | 41 # Bogus ifdef tricks |
44 r'renderer_webkitplatformsupport_impl\.cc$', | 42 r'renderer_webkitplatformsupport_impl\.cc$', |
45 # Lines > 100 chars | 43 # Lines > 100 chars |
46 r'gcapi\.cc$', | 44 r'gcapi\.cc$', |
47 ) | 45 ) |
48 | 46 |
49 def _CheckChangeLintsClean(input_api, output_api): | 47 def _CheckChangeLintsClean(input_api, output_api): |
50 """Makes sure that the chrome/ code is cpplint clean.""" | 48 """Makes sure that the chrome/ code is cpplint clean.""" |
51 black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDE | 49 black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDE |
52 sources = lambda x: input_api.FilterSourceFile( | 50 sources = lambda x: input_api.FilterSourceFile( |
(...skipping 29 matching lines...) Expand all Loading... |
82 def CheckChangeOnUpload(input_api, output_api): | 80 def CheckChangeOnUpload(input_api, output_api): |
83 results = [] | 81 results = [] |
84 results.extend(_CommonChecks(input_api, output_api)) | 82 results.extend(_CommonChecks(input_api, output_api)) |
85 results.extend(_CheckChangeLintsClean(input_api, output_api)) | 83 results.extend(_CheckChangeLintsClean(input_api, output_api)) |
86 return results | 84 return results |
87 | 85 |
88 def CheckChangeOnCommit(input_api, output_api): | 86 def CheckChangeOnCommit(input_api, output_api): |
89 results = [] | 87 results = [] |
90 results.extend(_CommonChecks(input_api, output_api)) | 88 results.extend(_CommonChecks(input_api, output_api)) |
91 return results | 89 return results |
OLD | NEW |