OLD | NEW |
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 depot_tools. | 8 for more details about the presubmit API built into depot_tools. |
9 """ | 9 """ |
10 | 10 |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 r"^extensions[\\\/]renderer[\\\/]logging_native_handler\.cc$", | 1179 r"^extensions[\\\/]renderer[\\\/]logging_native_handler\.cc$", |
1180 r"^ipc[\\\/]ipc_logging\.cc$", | 1180 r"^ipc[\\\/]ipc_logging\.cc$", |
1181 r"^native_client_sdk[\\\/]", | 1181 r"^native_client_sdk[\\\/]", |
1182 r"^remoting[\\\/]base[\\\/]logging\.h$", | 1182 r"^remoting[\\\/]base[\\\/]logging\.h$", |
1183 r"^remoting[\\\/]host[\\\/].*", | 1183 r"^remoting[\\\/]host[\\\/].*", |
1184 r"^sandbox[\\\/]linux[\\\/].*", | 1184 r"^sandbox[\\\/]linux[\\\/].*", |
1185 r"^tools[\\\/]", | 1185 r"^tools[\\\/]", |
1186 r"^ui[\\\/]aura[\\\/]bench[\\\/]bench_main\.cc$", | 1186 r"^ui[\\\/]aura[\\\/]bench[\\\/]bench_main\.cc$", |
1187 r"^ui[\\\/]ozone[\\\/]platform[\\\/]cast[\\\/]", | 1187 r"^ui[\\\/]ozone[\\\/]platform[\\\/]cast[\\\/]", |
1188 r"^storage[\\\/]browser[\\\/]fileapi[\\\/]" + | 1188 r"^storage[\\\/]browser[\\\/]fileapi[\\\/]" + |
1189 r"dump_file_system.cc$",)) | 1189 r"dump_file_system.cc$", |
| 1190 r"^headless[\\\/]app[\\\/]headless_shell\.cc$")) |
1190 source_file_filter = lambda x: input_api.FilterSourceFile( | 1191 source_file_filter = lambda x: input_api.FilterSourceFile( |
1191 x, white_list=(file_inclusion_pattern,), black_list=black_list) | 1192 x, white_list=(file_inclusion_pattern,), black_list=black_list) |
1192 | 1193 |
1193 log_info = [] | 1194 log_info = [] |
1194 printf = [] | 1195 printf = [] |
1195 | 1196 |
1196 for f in input_api.AffectedSourceFiles(source_file_filter): | 1197 for f in input_api.AffectedSourceFiles(source_file_filter): |
1197 contents = input_api.ReadFile(f, 'rb') | 1198 contents = input_api.ReadFile(f, 'rb') |
1198 if input_api.re.search(r"\bD?LOG\s*\(\s*INFO\s*\)", contents): | 1199 if input_api.re.search(r"\bD?LOG\s*\(\s*INFO\s*\)", contents): |
1199 log_info.append(f.LocalPath()) | 1200 log_info.append(f.LocalPath()) |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2350 results.extend(input_api.canned_checks.CheckTreeIsOpen( | 2351 results.extend(input_api.canned_checks.CheckTreeIsOpen( |
2351 input_api, | 2352 input_api, |
2352 output_api, | 2353 output_api, |
2353 json_url='http://chromium-status.appspot.com/current?format=json')) | 2354 json_url='http://chromium-status.appspot.com/current?format=json')) |
2354 | 2355 |
2355 results.extend(input_api.canned_checks.CheckChangeHasBugField( | 2356 results.extend(input_api.canned_checks.CheckChangeHasBugField( |
2356 input_api, output_api)) | 2357 input_api, output_api)) |
2357 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 2358 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
2358 input_api, output_api)) | 2359 input_api, output_api)) |
2359 return results | 2360 return results |
OLD | NEW |