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

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: Dan's 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 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(
25 input_api.PresubmitLocalPath(), '..', '..', '..', 'ui', 'externs')
Dan Beam 2016/02/23 23:26:17 externs_root = join(api_root, '..', '..', '..', 'u
Devlin 2016/02/24 00:05:05 Whoops, done.
26
27 api_pairs = {
28 join(api_root, 'bluetooth.idl'): join(externs_root, 'bluetooth.js'),
29 #TODO(devlin): Add more!
Dan Beam 2016/02/23 23:26:17 nit: # TODO(rdevlin.cronin):
Devlin 2016/02/24 00:05:05 I know it's unusual, but I use devlin just about e
Dan Beam 2016/02/24 00:15:31 you should change TODO(devlin) to TODO(rdevlin.cro
Devlin 2016/02/24 00:24:23 Changed here.
Devlin 2016/02/24 00:27:30 For reference, the reasons I prefer devlin are: -
30 }
31
32 return ExternsChecker(input_api, output_api, api_pairs).RunChecks()
33
34 def CheckChangeOnUpload(input_api, output_api):
35 return _CheckExterns(input_api, output_api)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698