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

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

Issue 1358433003: MD Settings: Make PolicyControllable behavior for isPolicyControlled() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: i have brought great shame upon us Created 5 years, 3 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
« no previous file with comments | « chrome/browser/resources/settings/settings_resources.grd ('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/PRESUBMIT.py 7 See chrome/browser/PRESUBMIT.py
8 """ 8 """
9 9
10 import regex_check 10 import regex_check
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 return not is_grit_statement and error.code not in [ 182 return not is_grit_statement and error.code not in [
183 errors.COMMA_AT_END_OF_LITERAL, 183 errors.COMMA_AT_END_OF_LITERAL,
184 errors.JSDOC_ILLEGAL_QUESTION_WITH_PIPE, 184 errors.JSDOC_ILLEGAL_QUESTION_WITH_PIPE,
185 errors.LINE_TOO_LONG, 185 errors.LINE_TOO_LONG,
186 errors.MISSING_JSDOC_TAG_THIS, 186 errors.MISSING_JSDOC_TAG_THIS,
187 ] 187 ]
188 188
189 # Whitelist Polymer-specific JsDoc tags. 189 # Whitelist Polymer-specific JsDoc tags.
190 gflags.FLAGS.custom_jsdoc_tags = ('group', 'element', 'attribute', 190 gflags.FLAGS.custom_jsdoc_tags = ('group', 'element', 'attribute',
191 'default') 191 'default', 'polymerBehavior')
192 error_handler = ErrorHandlerImpl(self.input_api.re) 192 error_handler = ErrorHandlerImpl(self.input_api.re)
193 runner.Run(file_to_lint, error_handler, source=source) 193 runner.Run(file_to_lint, error_handler, source=source)
194 return error_handler.GetErrors() 194 return error_handler.GetErrors()
195 195
196 def RunChecks(self): 196 def RunChecks(self):
197 """Check for violations of the Chromium JavaScript style guide. See 197 """Check for violations of the Chromium JavaScript style guide. See
198 http://chromium.org/developers/web-development-style-guide#TOC-JavaScript 198 http://chromium.org/developers/web-development-style-guide#TOC-JavaScript
199 """ 199 """
200 results = [] 200 results = []
201 201
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 results.append(self._MakeErrorOrWarning( 245 results.append(self._MakeErrorOrWarning(
246 '\n'.join(error_lines), f.AbsoluteLocalPath())) 246 '\n'.join(error_lines), f.AbsoluteLocalPath()))
247 247
248 if results: 248 if results:
249 results.append(self.output_api.PresubmitNotifyResult( 249 results.append(self.output_api.PresubmitNotifyResult(
250 'See the JavaScript style guide at ' 250 'See the JavaScript style guide at '
251 'http://www.chromium.org/developers/web-development-style-guide' 251 'http://www.chromium.org/developers/web-development-style-guide'
252 '#TOC-JavaScript')) 252 '#TOC-JavaScript'))
253 253
254 return results 254 return results
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/settings_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698