Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: tools/telemetry/PRESUBMIT.py

Issue 838443007: Remove telemetry hook into trace-viewer presubmit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 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 import os 4 import os
5 import sys 5 import sys
6 6
7 PYLINT_BLACKLIST = [] 7 PYLINT_BLACKLIST = []
8 PYLINT_DISABLED_WARNINGS = ['R0923', 'R0201', 'E1101'] 8 PYLINT_DISABLED_WARNINGS = ['R0923', 'R0201', 'E1101']
9 9
10 def _CommonChecks(input_api, output_api): 10 def _CommonChecks(input_api, output_api):
11 results = [] 11 results = []
12 12
13 # TODO(nduca): This should call update_docs.IsUpdateDocsNeeded(). 13 # TODO(nduca): This should call update_docs.IsUpdateDocsNeeded().
14 # Disabled due to crbug.com/255326. 14 # Disabled due to crbug.com/255326.
15 if False: 15 if False:
16 update_docs_path = os.path.join( 16 update_docs_path = os.path.join(
17 input_api.PresubmitLocalPath(), 'update_docs') 17 input_api.PresubmitLocalPath(), 'update_docs')
18 assert os.path.exists(update_docs_path) 18 assert os.path.exists(update_docs_path)
19 results.append(output_api.PresubmitError( 19 results.append(output_api.PresubmitError(
20 'Docs are stale. Please run:\n' + 20 'Docs are stale. Please run:\n' +
21 '$ %s' % os.path.abspath(update_docs_path))) 21 '$ %s' % os.path.abspath(update_docs_path)))
22 22
23 # Importing telemetry.web_components actually brings tvcm into the path.
24 import telemetry.web_components # pylint: disable=W0612
25 from tvcm import presubmit_checker
26 checker = presubmit_checker.PresubmitChecker(input_api, output_api)
27 results += checker.RunChecks()
28
29 results.extend(input_api.canned_checks.RunPylint( 23 results.extend(input_api.canned_checks.RunPylint(
30 input_api, output_api, 24 input_api, output_api,
31 black_list=PYLINT_BLACKLIST, 25 black_list=PYLINT_BLACKLIST,
32 disabled_warnings=PYLINT_DISABLED_WARNINGS)) 26 disabled_warnings=PYLINT_DISABLED_WARNINGS))
33 return results 27 return results
34 28
35 def GetPathsToPrepend(input_api): 29 def GetPathsToPrepend(input_api):
36 return [input_api.PresubmitLocalPath(), 30 return [input_api.PresubmitLocalPath(),
37 os.path.join(input_api.PresubmitLocalPath(), os.path.pardir, 31 os.path.join(input_api.PresubmitLocalPath(), os.path.pardir,
38 os.path.pardir, 'third_party', 'typ')] 32 os.path.pardir, 'third_party', 'typ')]
(...skipping 13 matching lines...) Expand all
52 results.extend(_CommonChecks(input_api, output_api)) 46 results.extend(_CommonChecks(input_api, output_api))
53 return results 47 return results
54 return RunWithPrependedPath(GetPathsToPrepend(input_api), go) 48 return RunWithPrependedPath(GetPathsToPrepend(input_api), go)
55 49
56 def CheckChangeOnCommit(input_api, output_api): 50 def CheckChangeOnCommit(input_api, output_api):
57 def go(): 51 def go():
58 results = [] 52 results = []
59 results.extend(_CommonChecks(input_api, output_api)) 53 results.extend(_CommonChecks(input_api, output_api))
60 return results 54 return results
61 return RunWithPrependedPath(GetPathsToPrepend(input_api), go) 55 return RunWithPrependedPath(GetPathsToPrepend(input_api), go)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698