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
3 # found in the LICENSE file.
9 PYLINT_DISABLED_WARNINGS = ['R0923', 'R0201', 'E1101']
12 def _CommonChecks(input_api, output_api):
14 old_sys_path = sys.path
16 sys.path = [os.path.join(os.pardir, 'telemetry')] + sys.path
17 results.extend(input_api.canned_checks.RunPylint(
18 input_api, output_api,
19 black_list=PYLINT_BLACKLIST,
20 disabled_warnings=PYLINT_DISABLED_WARNINGS))
22 sys.path = old_sys_path
26 def CheckChangeOnUpload(input_api, output_api):
28 report.extend(_CommonChecks(input_api, output_api))
32 def CheckChangeOnCommit(input_api, output_api):
34 report.extend(_CommonChecks(input_api, output_api))