Chromium Code Reviews| 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 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1406 def _CheckParseErrors(input_api, output_api): | 1406 def _CheckParseErrors(input_api, output_api): |
| 1407 """Check that IDL and JSON files do not contain syntax errors.""" | 1407 """Check that IDL and JSON files do not contain syntax errors.""" |
| 1408 actions = { | 1408 actions = { |
| 1409 '.idl': _GetIDLParseError, | 1409 '.idl': _GetIDLParseError, |
| 1410 '.json': _GetJSONParseError, | 1410 '.json': _GetJSONParseError, |
| 1411 } | 1411 } |
| 1412 # These paths contain test data and other known invalid JSON files. | 1412 # These paths contain test data and other known invalid JSON files. |
| 1413 excluded_patterns = [ | 1413 excluded_patterns = [ |
| 1414 r'test[\\\/]data[\\\/]', | 1414 r'test[\\\/]data[\\\/]', |
| 1415 r'^components[\\\/]policy[\\\/]resources[\\\/]policy_templates\.json$', | 1415 r'^components[\\\/]policy[\\\/]resources[\\\/]policy_templates\.json$', |
| 1416 # Contains valid JSON but is excluded for performance reasons. The | |
| 1417 # well-formedness of this file is checked during the build. | |
| 1418 r'^net[\\\/]http[\\\/]transport_security_state_static\.json$', | |
|
Dirk Pranke
2017/04/10 19:34:27
Seems like we should fix the comment eater instead
martijnc
2017/04/11 20:18:13
I've updated the CL to fix the performance issue i
| |
| 1416 ] | 1419 ] |
| 1417 # Most JSON files are preprocessed and support comments, but these do not. | 1420 # Most JSON files are preprocessed and support comments, but these do not. |
| 1418 json_no_comments_patterns = [ | 1421 json_no_comments_patterns = [ |
| 1419 r'^testing[\\\/]', | 1422 r'^testing[\\\/]', |
| 1420 ] | 1423 ] |
| 1421 # Only run IDL checker on files in these directories. | 1424 # Only run IDL checker on files in these directories. |
| 1422 idl_included_patterns = [ | 1425 idl_included_patterns = [ |
| 1423 r'^chrome[\\\/]common[\\\/]extensions[\\\/]api[\\\/]', | 1426 r'^chrome[\\\/]common[\\\/]extensions[\\\/]api[\\\/]', |
| 1424 r'^extensions[\\\/]common[\\\/]api[\\\/]', | 1427 r'^extensions[\\\/]common[\\\/]api[\\\/]', |
| 1425 ] | 1428 ] |
| (...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2405 output_api, | 2408 output_api, |
| 2406 json_url='http://chromium-status.appspot.com/current?format=json')) | 2409 json_url='http://chromium-status.appspot.com/current?format=json')) |
| 2407 | 2410 |
| 2408 results.extend( | 2411 results.extend( |
| 2409 input_api.canned_checks.CheckPatchFormatted(input_api, output_api)) | 2412 input_api.canned_checks.CheckPatchFormatted(input_api, output_api)) |
| 2410 results.extend(input_api.canned_checks.CheckChangeHasBugField( | 2413 results.extend(input_api.canned_checks.CheckChangeHasBugField( |
| 2411 input_api, output_api)) | 2414 input_api, output_api)) |
| 2412 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 2415 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
| 2413 input_api, output_api)) | 2416 input_api, output_api)) |
| 2414 return results | 2417 return results |
| OLD | NEW |