Commit d2600606 authored by raymes@google.com's avatar raymes@google.com

Exclude vulcanize-generated HTML/JS from PRESUBMIT.py checks

These files are automatically generated for the PDF extension. The long term
solution is not to check in vulcanize-generated files. These files may not
be needed once HTMLImports are fully implemented in chrome.

BUG=303491
R=arv@chromium.org, maruel@chromium.org

Review URL: https://codereview.chromium.org/154223003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251890 0039d316-1c4b-4281-b951-d872f2087c98
parent bd275222
...@@ -25,6 +25,7 @@ _EXCLUDED_PATHS = ( ...@@ -25,6 +25,7 @@ _EXCLUDED_PATHS = (
r".+_autogen\.h$", r".+_autogen\.h$",
r".+[\\\/]pnacl_shim\.c$", r".+[\\\/]pnacl_shim\.c$",
r"^gpu[\\\/]config[\\\/].*_list_json\.cc$", r"^gpu[\\\/]config[\\\/].*_list_json\.cc$",
r"^chrome[\\\/]browser[\\\/]resources[\\\/]pdf[\\\/]index.js"
) )
# TestRunner and NetscapePlugIn library is temporarily excluded from pan-project # TestRunner and NetscapePlugIn library is temporarily excluded from pan-project
......
...@@ -47,8 +47,11 @@ def _CommonChecks(input_api, output_api): ...@@ -47,8 +47,11 @@ def _CommonChecks(input_api, output_api):
def _html_css_js_resource(p): def _html_css_js_resource(p):
return p.endswith(('.html', '.css', '.js')) and p.startswith(resources) return p.endswith(('.html', '.css', '.js')) and p.startswith(resources)
BLACKLIST = ['chrome/browser/resources/pdf/index.html',
'chrome/browser/resources/pdf/index.js']
def is_resource(maybe_resource): def is_resource(maybe_resource):
return _html_css_js_resource(maybe_resource.AbsoluteLocalPath()) return (maybe_resource.LocalPath() not in BLACKLIST and
_html_css_js_resource(maybe_resource.AbsoluteLocalPath()))
results.extend(css_checker.CSSChecker( results.extend(css_checker.CSSChecker(
input_api, output_api, file_filter=is_resource).RunChecks()) input_api, output_api, file_filter=is_resource).RunChecks())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment