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

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

Issue 866753002: Fix the 'for' attribute check in presubmit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test for the presubmit check. Created 5 years, 11 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 | « chrome/browser/test_presubmit.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_dev_style/html_checker.py
diff --git a/chrome/browser/web_dev_style/html_checker.py b/chrome/browser/web_dev_style/html_checker.py
index 0addcd71ad623a3b108c4ca47349e640f61312a6..408ff909bd0cef2d3cfdc8cd7bb9b226c4d001dc 100644
--- a/chrome/browser/web_dev_style/html_checker.py
+++ b/chrome/browser/web_dev_style/html_checker.py
@@ -17,7 +17,7 @@ class HtmlChecker(object):
def LabelCheck(self, line_number, line):
return regex_check.RegexCheck(self.input_api.re, line_number, line,
- "(for=)",
+ r"(?:^|\s)(for=)",
"Avoid 'for' attribute on <label>. Place the input within the <label>, "
"or use aria-labelledby for <select>.")
« no previous file with comments | « chrome/browser/test_presubmit.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698