| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 """Presubmit script for Chromium JS resources. | 5 """Presubmit script for Chromium JS resources. |
| 6 | 6 |
| 7 See chrome/browser/resources/PRESUBMIT.py | 7 See chrome/browser/resources/PRESUBMIT.py |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 class JSChecker(object): | 10 class JSChecker(object): |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 taken out all the style guide violations) or a PresubmitPromptWarning | 68 taken out all the style guide violations) or a PresubmitPromptWarning |
| 69 (if it's in a directory where we haven't done that yet). | 69 (if it's in a directory where we haven't done that yet). |
| 70 """ | 70 """ |
| 71 # TODO(tbreisacher): Once we've cleaned up the style nits in all of | 71 # TODO(tbreisacher): Once we've cleaned up the style nits in all of |
| 72 # resources/ we can get rid of this function. | 72 # resources/ we can get rid of this function. |
| 73 path = self.input_api.os_path | 73 path = self.input_api.os_path |
| 74 resources = self.input_api.PresubmitLocalPath() | 74 resources = self.input_api.PresubmitLocalPath() |
| 75 dirs = ( | 75 dirs = ( |
| 76 path.join(resources, 'extensions'), | 76 path.join(resources, 'extensions'), |
| 77 path.join(resources, 'help'), | 77 path.join(resources, 'help'), |
| 78 path.join(resources, 'history'), |
| 78 path.join(resources, 'net_internals'), | 79 path.join(resources, 'net_internals'), |
| 79 path.join(resources, 'ntp4'), | 80 path.join(resources, 'ntp4'), |
| 80 path.join(resources, 'options2'), | 81 path.join(resources, 'options2'), |
| 81 path.join(resources, 'print_preview'), | 82 path.join(resources, 'print_preview'), |
| 82 path.join(resources, 'profiler'), | 83 path.join(resources, 'profiler'), |
| 83 path.join(resources, 'sync_promo'), | 84 path.join(resources, 'sync_promo'), |
| 84 path.join(resources, 'tracing'), | 85 path.join(resources, 'tracing'), |
| 85 path.join(resources, 'uber'), | 86 path.join(resources, 'uber'), |
| 86 ) | 87 ) |
| 87 if filename.startswith(dirs): | 88 if filename.startswith(dirs): |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 '\n'.join(error_lines), f.AbsoluteLocalPath())) | 205 '\n'.join(error_lines), f.AbsoluteLocalPath())) |
| 205 | 206 |
| 206 if results: | 207 if results: |
| 207 results.append(self.output_api.PresubmitNotifyResult( | 208 results.append(self.output_api.PresubmitNotifyResult( |
| 208 'See the JavaScript style guide at ' | 209 'See the JavaScript style guide at ' |
| 209 'http://www.chromium.org/developers/web-development-style-guide' | 210 'http://www.chromium.org/developers/web-development-style-guide' |
| 210 '#TOC-JavaScript and if you have any feedback about the JavaScript ' | 211 '#TOC-JavaScript and if you have any feedback about the JavaScript ' |
| 211 'PRESUBMIT check, contact tbreisacher@chromium.org')) | 212 'PRESUBMIT check, contact tbreisacher@chromium.org')) |
| 212 | 213 |
| 213 return results | 214 return results |
| OLD | NEW |