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

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
13 _API_PAIRS = {
14 'extensions/common/api/bluetooth.idl': 'ui/externs/bluetooth.js',
Devlin 2016/02/22 23:26:14 Just adding one for now. Step 2: add all the ones
Dan Beam 2016/02/23 03:15:23 nit: use os.path.join() maybe?
Devlin 2016/02/23 23:12:39 Good call, done.
15 #TODO(devlin): Add more!
16 }
17
18 def _CheckExterns(input_api, output_api):
19 original_sys_path = sys.path
20
21 try:
22 sys.path.append(input_api.PresubmitLocalPath())
23 from externs_checker import ExternsChecker
24 finally:
25 sys.path = original_sys_path
26
27 return ExternsChecker(input_api, output_api, _API_PAIRS).RunChecks()
28
29 def CheckChangeOnUpload(input_api, output_api):
30 return _CheckExterns(input_api, output_api)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698