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

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

Issue 2890513003: Move chrome/browser/web_dev_style/ to tools/ to use from more places (Closed)
Patch Set: tsergeant@ review Created 3 years, 7 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/PRESUBMIT.py ('k') | chrome/browser/ui/webui/PRESUBMIT.py » ('j') | 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 891533fe71f3fbe12ebbd2abcc06a614e5f73b69..05fc9cd8cab5aa3cd1a71fff0261d184f3484a67 100644
--- a/chrome/browser/resources/PRESUBMIT.py
+++ b/chrome/browser/resources/PRESUBMIT.py
@@ -102,6 +102,22 @@ def RunVulcanizeTests(input_api, output_api):
return input_api.canned_checks.RunUnitTests(input_api, output_api, tests)
+def _CheckWebDevStyle(input_api, output_api):
+ results = []
+
+ try:
+ import sys
+ old_sys_path = sys.path
+ cwd = input_api.PresubmitLocalPath()
+ sys.path += [input_api.os_path.join(cwd, '..', '..', '..', 'tools')]
+ import web_dev_style.presubmit_support
+ results += web_dev_style.presubmit_support.CheckStyle(input_api, output_api)
+ finally:
+ sys.path = old_sys_path
+
+ return results
+
+
def _CheckChangeOnUploadOrCommit(input_api, output_api):
results = CheckUserActionUpdate(input_api, output_api, ACTION_XML_PATH)
affected = input_api.AffectedFiles()
@@ -109,6 +125,7 @@ def _CheckChangeOnUploadOrCommit(input_api, output_api):
results += CheckHtml(input_api, output_api)
if any(f for f in affected if f.LocalPath().endswith('vulcanize_gn.py')):
results += RunVulcanizeTests(input_api, output_api)
+ results += _CheckWebDevStyle(input_api, output_api)
return results
« no previous file with comments | « chrome/browser/PRESUBMIT.py ('k') | chrome/browser/ui/webui/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698