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

Side by Side Diff: extensions/common/api/PRESUBMIT.py

Issue 1718243003: [Extern Generation] Add a presubmit script to check externs not being updated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move file back Created 4 years, 10 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 | « PRESUBMIT_test_mocks.py ('k') | extensions/common/api/externs_checker.py » ('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 2016 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 """Chromium presubmit script for src/extensions/common.
6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details on the presubmit API built into depot_tools.
9 """
10
11 import sys
12
13
14 def _CheckExterns(input_api, output_api):
15 original_sys_path = sys.path
16
17 try:
18 sys.path.append(input_api.PresubmitLocalPath())
19 from externs_checker import ExternsChecker
20 finally:
21 sys.path = original_sys_path
22
23 join = input_api.os_path.join
24 api_root = input_api.PresubmitLocalPath()
25 externs_root = join(api_root, '..', '..', '..', 'third_party',
26 'closure_compiler', 'externs')
27
28 api_pairs = {
29 join(api_root, 'bluetooth.idl'): join(externs_root, 'bluetooth.js'),
30 # TODO(rdevlin.cronin): Add more!
31 }
32
33 return ExternsChecker(input_api, output_api, api_pairs).RunChecks()
34
35
36 def CheckChangeOnUpload(input_api, output_api):
37 return _CheckExterns(input_api, output_api)
OLDNEW
« no previous file with comments | « PRESUBMIT_test_mocks.py ('k') | extensions/common/api/externs_checker.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698