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

Unified Diff: chrome/browser/web_dev_style/js_checker.py

Issue 2860903002: web_dev_style: tweak varNamesLikeThis check to detect endsWithUnder_ (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/web_dev_style/js_checker_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_dev_style/js_checker.py
diff --git a/chrome/browser/web_dev_style/js_checker.py b/chrome/browser/web_dev_style/js_checker.py
index 584fa51c7b70bc13c9d1d066437a03f39880d165..510926cbb9783c61b49ef5c5faaacd9a802632e8 100644
--- a/chrome/browser/web_dev_style/js_checker.py
+++ b/chrome/browser/web_dev_style/js_checker.py
@@ -76,10 +76,10 @@ class JSChecker(object):
"Don't use wrapper types (i.e. new String() or @type {String})")
def VarNameCheck(self, i, line):
- """See the style guide. http://goo.gl/uKir6"""
+ """See the style guide. http://goo.gl/eQiXVW"""
return self.RegexCheck(i, line,
- r"var (?!g_\w+)([a-z]*[_$][\w_$]*)(?<! \$)",
- "Please use var namesLikeThis <http://goo.gl/uKir6>")
+ r"var (?!g_\w+)(_?[a-z][a-zA-Z]*[_$][\w_$]*)(?<! \$)",
+ "Please use var namesLikeThis <https://goo.gl/eQiXVW>")
def _GetErrorHighlight(self, start, length):
"""Takes a start position and a length, and produces a row of '^'s to
« no previous file with comments | « no previous file | chrome/browser/web_dev_style/js_checker_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698