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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2017 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5
6 import css_checker
7 import html_checker
8 import js_checker
9 import resource_checker
10
11
12 def CheckStyle(input_api, output_api):
13 apis = input_api, output_api
14 is_resource = lambda f: f.LocalPath().endswith(('.html', '.css', '.js'))
15 checkers = [
16 css_checker.CSSChecker(*apis, file_filter=is_resource),
17 html_checker.HtmlChecker(*apis, file_filter=is_resource),
18 js_checker.JSChecker(*apis, file_filter=is_resource),
19 resource_checker.ResourceChecker(*apis, file_filter=is_resource),
20 ]
21 results = []
22 for checker in checkers:
23 results.extend(checker.RunChecks())
24 return results
OLDNEW
« 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