| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 mojo | 5 """Presubmit script for mojo |
| 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 |
| 11 import os.path | 11 import os.path |
| 12 import re | 12 import re |
| 13 | 13 |
| 14 # NOTE: The EDK allows all external paths, so doesn't need a whitelist. | 14 # NOTE: The EDK allows all external paths, so doesn't need a whitelist. |
| 15 _PACKAGE_WHITELISTED_EXTERNAL_PATHS = { | 15 _PACKAGE_WHITELISTED_EXTERNAL_PATHS = { |
| 16 "SDK": ["//build/module_args/mojo.gni", | 16 "SDK": ["//build/module_args/mojo.gni", |
| 17 "//build/module_args/dart.gni", |
| 17 "//testing/gtest", | 18 "//testing/gtest", |
| 18 "//third_party/cython", | 19 "//third_party/cython", |
| 19 "//third_party/khronos"], | 20 "//third_party/khronos"], |
| 20 "services": ["//build/module_args/mojo.gni", | 21 "services": ["//build/module_args/mojo.gni", |
| 21 "//testing/gtest"], | 22 "//testing/gtest"], |
| 22 } | 23 } |
| 23 | 24 |
| 24 # These files are not part of the exported package. | 25 # These files are not part of the exported package. |
| 25 _PACKAGE_IGNORED_BUILD_FILES = { | 26 _PACKAGE_IGNORED_BUILD_FILES = { |
| 26 "SDK": {}, | 27 "SDK": {}, |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 def CheckChangeOnUpload(input_api, output_api): | 279 def CheckChangeOnUpload(input_api, output_api): |
| 279 results = [] | 280 results = [] |
| 280 results.extend(_CommonChecks(input_api, output_api)) | 281 results.extend(_CommonChecks(input_api, output_api)) |
| 281 results.extend(_CheckChangePylintsClean(input_api, output_api)) | 282 results.extend(_CheckChangePylintsClean(input_api, output_api)) |
| 282 return results | 283 return results |
| 283 | 284 |
| 284 def CheckChangeOnCommit(input_api, output_api): | 285 def CheckChangeOnCommit(input_api, output_api): |
| 285 results = [] | 286 results = [] |
| 286 results.extend(_CommonChecks(input_api, output_api)) | 287 results.extend(_CommonChecks(input_api, output_api)) |
| 287 return results | 288 return results |
| OLD | NEW |