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

Unified Diff: chrome/browser/resources/PRESUBMIT.py

Issue 2729403003: [presubmit] check for long lines in HTML files (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/PRESUBMIT.py
diff --git a/chrome/browser/resources/PRESUBMIT.py b/chrome/browser/resources/PRESUBMIT.py
index 3f14fe793132fc9fe598974787b985d5ab426a49..a1d243c5da0f5f04e9a814660eed981b927607dd 100644
--- a/chrome/browser/resources/PRESUBMIT.py
+++ b/chrome/browser/resources/PRESUBMIT.py
@@ -91,6 +91,10 @@ def IsBoolean(new_content_lines, metric_name, input_api):
any(input_api.re.search(type_re, match.group(i)) for i in (1, 3)))
+def CheckHtml(input_api, output_api):
+ return input_api.canned_checks.CheckLongLines(input_api, output_api, 80)
tommycli 2017/03/06 22:06:15 Read 2nd comment first... seems a bit redundant t
+
+
def RunVulcanizeTests(input_api, output_api):
presubmit_path = input_api.PresubmitLocalPath()
tests = [input_api.os_path.join(presubmit_path, 'vulcanize_gn_test.py')]
@@ -100,6 +104,8 @@ def RunVulcanizeTests(input_api, output_api):
def _CheckChangeOnUploadOrCommit(input_api, output_api):
results = CheckUserActionUpdate(input_api, output_api, ACTION_XML_PATH)
affected = input_api.AffectedFiles()
+ if any(f for f in affected if f.LocalPath().endswith('.html')):
+ results += CheckHtml(input_api, output_api)
tommycli 2017/03/06 22:06:15 I wonder why this isn't included already via: http
dschuyler 2017/03/07 01:14:56 Afaik, the canned checks provide functionality, bu
if any(f for f in affected if f.LocalPath().endswith('vulcanize_gn.py')):
results += RunVulcanizeTests(input_api, output_api)
return results
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698