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

Unified Diff: tools/web_dev_style/presubmit_support.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 | « tools/web_dev_style/js_checker_test.py ('k') | tools/web_dev_style/regex_check.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/web_dev_style/presubmit_support.py
diff --git a/tools/web_dev_style/presubmit_support.py b/tools/web_dev_style/presubmit_support.py
new file mode 100644
index 0000000000000000000000000000000000000000..3be6d6d67b251b67cdadfe762981252635c8b36a
--- /dev/null
+++ b/tools/web_dev_style/presubmit_support.py
@@ -0,0 +1,24 @@
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+import css_checker
+import html_checker
+import js_checker
+import resource_checker
+
+
+def CheckStyle(input_api, output_api):
+ apis = input_api, output_api
+ is_resource = lambda f: f.LocalPath().endswith(('.html', '.css', '.js'))
+ checkers = [
+ css_checker.CSSChecker(*apis, file_filter=is_resource),
+ html_checker.HtmlChecker(*apis, file_filter=is_resource),
+ js_checker.JSChecker(*apis, file_filter=is_resource),
+ resource_checker.ResourceChecker(*apis, file_filter=is_resource),
+ ]
+ results = []
+ for checker in checkers:
+ results.extend(checker.RunChecks())
+ return results
« no previous file with comments | « tools/web_dev_style/js_checker_test.py ('k') | tools/web_dev_style/regex_check.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698