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

Side by Side Diff: chrome/browser/resources/web_dev_style/js_checker.py

Issue 10164005: History: Fix JavaScript style issues so presubmit checks pass. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address tbreisacher's comments. Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/history/history.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/resources/history/history.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698