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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 Don't embed translations directly in shared UI code. Instead, inject your | 52 Don't embed translations directly in shared UI code. Instead, inject your |
53 translation from the place using the shared code. For an example: see | 53 translation from the place using the shared code. For an example: see |
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: |
| 63 import sys |
| 64 old_sys_path = sys.path |
| 65 cwd = input_api.PresubmitLocalPath() |
| 66 sys.path += [input_api.os_path.join(cwd, '..', '..', '..', 'tools')] |
| 67 from web_dev_style import presubmit_support |
| 68 BLACKLIST = ['ui/webui/resources/js/analytics.js', |
| 69 'ui/webui/resources/js/jstemplate_compiled.js'] |
| 70 file_filter = lambda f: f.LocalPath() not in BLACKLIST |
| 71 results += presubmit_support.CheckStyle(input_api, output_api, file_filter) |
| 72 finally: |
| 73 sys.path = old_sys_path |
62 return results | 74 return results |
OLD | NEW |