Skip to content

Commit

Permalink
Exclude vulcanize-generated HTML/JS from PRESUBMIT.py checks
Browse files Browse the repository at this point in the history
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
  • Loading branch information
raymes@google.com committed Feb 19, 2014
1 parent bd27522 commit d260060
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
r".+_autogen\.h$",
r".+[\\\/]pnacl_shim\.c$",
r"^gpu[\\\/]config[\\\/].*_list_json\.cc$",
r"^chrome[\\\/]browser[\\\/]resources[\\\/]pdf[\\\/]index.js"
)

# TestRunner and NetscapePlugIn library is temporarily excluded from pan-project
Expand Down
5 changes: 4 additions & 1 deletion chrome/browser/resources/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ def _CommonChecks(input_api, output_api):
def _html_css_js_resource(p):
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):
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(
input_api, output_api, file_filter=is_resource).RunChecks())
Expand Down

0 comments on commit d260060

Please sign in to comment.