OLD | NEW |
(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 |
OLD | NEW |