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

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: 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
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
Dan Beam 2016/02/24 00:50:42 \n\n
Devlin 2016/02/24 04:45:23 Done.
13 def _CheckExterns(input_api, output_api):
14 original_sys_path = sys.path
15
16 try:
17 sys.path.append(input_api.PresubmitLocalPath())
18 from externs_checker import ExternsChecker
19 finally:
20 sys.path = original_sys_path
21
22 join = input_api.os_path.join
23 api_root = input_api.PresubmitLocalPath()
24 externs_root = join(api_root, '..', '..', '..', 'ui', 'externs')
25
26 api_pairs = {
27 join(api_root, 'bluetooth.idl'): join(externs_root, 'bluetooth.js'),
28 #TODO(rdevlin.cronin): Add more!
Dan Beam 2016/02/24 00:50:42 note: the space after #, as in # TODO(
Devlin 2016/02/24 04:45:23 Done.
29 }
30
31 return ExternsChecker(input_api, output_api, api_pairs).RunChecks()
32
Dan Beam 2016/02/24 00:50:42 \n\n
Devlin 2016/02/24 04:45:23 Done.
33 def CheckChangeOnUpload(input_api, output_api):
34 return _CheckExterns(input_api, output_api)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698