blob: dc0b66c12405be45b4b9abd67db54afeb9e051b3 [file] [log] [blame]
[email protected]75e10ff2012-09-04 23:54:131# 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
3# found in the LICENSE file.
4
5"""Top-level presubmit script for isolate.
6
7See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
8details on the presubmit API built into gcl.
9"""
10
11
12def CommonChecks(input_api, output_api):
13 output = []
14 disabled_warnings = [
[email protected]bb06d4e2012-09-10 20:47:2015 'F0401', # Unable to import module
[email protected]75e10ff2012-09-04 23:54:1316 'R0401', # Cyclic import
17 'W0613', # Unused argument
18 'E1103', # subprocess.communicate() generates these :(
[email protected]bb06d4e2012-09-10 20:47:2019 'R0201', # method could be function (doesn't reference self)
[email protected]75e10ff2012-09-04 23:54:1320 ]
[email protected]bb06d4e2012-09-10 20:47:2021 black_list = [r'src/build_tools/tests/.*',
22 r'src/site_scons/.*',
23 ]
[email protected]75e10ff2012-09-04 23:54:1324 canned = input_api.canned_checks
25 output.extend(canned.RunPylint(input_api, output_api, black_list=black_list,
26 disabled_warnings=disabled_warnings))
27 return output
28
29
30def CheckChangeOnUpload(input_api, output_api):
31 return CommonChecks(input_api, output_api)
32
33
34def CheckChangeOnCommit(input_api, output_api):
35 return CommonChecks(input_api, output_api)