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

Side by Side Diff: chrome/browser/ui/webui/PRESUBMIT.py

Issue 2890513003: Move chrome/browser/web_dev_style/ to tools/ to use from more places (Closed)
Patch Set: tsergeant@ review Created 3 years, 7 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 | « chrome/browser/resources/PRESUBMIT.py ('k') | chrome/browser/web_dev_style/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2017 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 """Presubmit script for files in chrome/browser/ui/webui.
6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into depot_tools.
9 """
10
11
12 def _CheckWebDevStyle(input_api, output_api):
13 results = []
14 try:
15 import sys
16 old_sys_path = sys.path
17 cwd = input_api.PresubmitLocalPath()
18 sys.path += [input_api.os_path.join(cwd, '..', '..', '..', '..', 'tools')]
19 import web_dev_style.presubmit_support
20 results = web_dev_style.presubmit_support.CheckStyle(input_api, output_api)
21 finally:
22 sys.path = old_sys_path
23 return results
24
25
26 def CheckChangeOnUpload(input_api, output_api):
27 return _CheckWebDevStyle(input_api, output_api)
28
29
30 def CheckChangeOnCommit(input_api, output_api):
31 return _CheckWebDevStyle(input_api, output_api)
OLDNEW
« no previous file with comments | « chrome/browser/resources/PRESUBMIT.py ('k') | chrome/browser/web_dev_style/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698