OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 def PostUploadHook(cl, change, output_api): | 5 def PostUploadHook(cl, change, output_api): |
6 return output_api.EnsureCQIncludeTrybotsAreAdded( | 6 return output_api.EnsureCQIncludeTrybotsAreAdded( |
7 cl, | 7 cl, |
8 [ | 8 [ |
9 'master.tryserver.chromium.linux:closure_compilation', | 9 'master.tryserver.chromium.linux:closure_compilation', |
10 ], | 10 ], |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 <cr-dialog>#closeText (http://bit.ly/2eLEsqh).""")] | 54 <cr-dialog>#closeText (http://bit.ly/2eLEsqh).""")] |
55 | 55 |
56 | 56 |
57 def _CommonChecks(input_api, output_api): | 57 def _CommonChecks(input_api, output_api): |
58 results = [] | 58 results = [] |
59 results += _CheckForTranslations(input_api, output_api) | 59 results += _CheckForTranslations(input_api, output_api) |
60 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api, | 60 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api, |
61 check_js=True) | 61 check_js=True) |
62 try: | 62 try: |
63 import sys | 63 import sys |
64 old_sys_path = sys.path | 64 old_sys_path = sys.path[:] |
65 cwd = input_api.PresubmitLocalPath() | 65 cwd = input_api.PresubmitLocalPath() |
66 sys.path += [input_api.os_path.join(cwd, '..', '..', '..', 'tools')] | 66 sys.path += [input_api.os_path.join(cwd, '..', '..', '..', 'tools')] |
67 from web_dev_style import presubmit_support | 67 from web_dev_style import presubmit_support |
68 BLACKLIST = ['ui/webui/resources/js/analytics.js', | 68 BLACKLIST = ['ui/webui/resources/js/analytics.js', |
69 'ui/webui/resources/js/jstemplate_compiled.js'] | 69 'ui/webui/resources/js/jstemplate_compiled.js'] |
70 file_filter = lambda f: f.LocalPath() not in BLACKLIST | 70 file_filter = lambda f: f.LocalPath() not in BLACKLIST |
71 results += presubmit_support.CheckStyle(input_api, output_api, file_filter) | 71 results += presubmit_support.CheckStyle(input_api, output_api, file_filter) |
72 finally: | 72 finally: |
73 sys.path = old_sys_path | 73 sys.path = old_sys_path |
74 return results | 74 return results |
OLD | NEW |