New issue
Advanced search Search tips

Issue 723234 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

web_dev_style: apply presubmit to more directories

Project Member Reported by dbeam@chromium.org, May 17 2017

Issue description

There has always been code that should abide by the web development style guide[1] in ui/webui/ but hasn't been automatedly checked.

Additionally, code from chrome/browser/ was moved to components/flags_ui, components/version_ui, components/about_ui a while ago to be used on iOS and was previously checked by presubmits but is no longer.

I think we should move chrome/browser/web_dev_style to a more generic location and hopefully makes it easier to check a whole CL's web resources with a single method call.

[1] https://chromium.googlesource.com/chromium/src/+/master/styleguide/web/web.md
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ccf7fefad401e05a493e59eabf3c99801fe5fd8a

commit ccf7fefad401e05a493e59eabf3c99801fe5fd8a
Author: dbeam <dbeam@chromium.org>
Date: Wed May 17 22:24:29 2017

Move chrome/browser/web_dev_style/ to tools/ to use from more places

There has always been code that should abide by the web development
style guide[1] in ui/webui/ but hasn't been automatedly checked.

Additionally, code from chrome/browser/ was moved to
components/flags_ui/, components/version_ui/, components/about_ui/ a
while ago to be used on iOS and was previously checked by presubmits but
is no longer.

This CL moves web_dev_style to a more generic location and hopefully
makes it easier to check a whole CL's web resources with a single method
call.

R=tsergeant@chromium.org
BUG= 723234 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2890513003
Cr-Commit-Position: refs/heads/master@{#472588}

[modify] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/chrome/browser/OWNERS
[modify] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/chrome/browser/PRESUBMIT.py
[modify] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/chrome/browser/resources/PRESUBMIT.py
[add] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/chrome/browser/ui/webui/PRESUBMIT.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/OWNERS
[add] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/PRESUBMIT.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/__init__.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/css_checker.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/css_checker_test.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/html_checker.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/html_checker_test.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/js_checker.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/js_checker_test.py
[add] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/presubmit_support.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/regex_check.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/resource_checker.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/resource_checker_test.py
[rename] https://crrev.com/ccf7fefad401e05a493e59eabf3c99801fe5fd8a/tools/web_dev_style/test_util.py

Project Member

Comment 2 by bugdroid1@chromium.org, May 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/229bcc24f4239dae6c676c583cebc3e68d13dca2

commit 229bcc24f4239dae6c676c583cebc3e68d13dca2
Author: dbeam <dbeam@chromium.org>
Date: Fri May 19 00:06:32 2017

web_dev_style: Fix errors in new directories and enable PRESUBMIT

Now fixed and checked:

- components/about_ui/
- components/flags_ui/
- components/version_ui/
- ui/webui/

Shockingly, nothing in components/ really had any errors, but that's
likely from them being copied from c/b/r and not being changed very
often (or me reviewing the changes closely in some cases).

R=tsergeant@chromium.org
BUG= 723234 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
NOTRY=true

Review-Url: https://codereview.chromium.org/2889113002
Cr-Commit-Position: refs/heads/master@{#472980}

[add] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/components/about_ui/PRESUBMIT.py
[add] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/components/flags_ui/PRESUBMIT.py
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/components/flags_ui/resources/flags.css
[add] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/components/version_ui/PRESUBMIT.py
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/tools/web_dev_style/css_checker.py
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/tools/web_dev_style/css_checker_test.py
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/tools/web_dev_style/html_checker.py
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/tools/web_dev_style/js_checker.py
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/tools/web_dev_style/presubmit_support.py
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/tools/web_dev_style/resource_checker.py
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/ui/webui/resources/PRESUBMIT.py
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.html
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.html
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/ui/webui/resources/cr_elements/policy/cr_policy_network_behavior.js
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/ui/webui/resources/css/apps/common.css
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/ui/webui/resources/css/bubble.css
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/ui/webui/resources/css/i18n_process.css
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/ui/webui/resources/css/list.css
[modify] https://crrev.com/229bcc24f4239dae6c676c583cebc3e68d13dca2/ui/webui/resources/js/cr/ui/bubble.js

Comment 3 by dbeam@chromium.org, Jun 2 2017

Status: Fixed (was: Started)
it's now pretty easy peasy to run the presubmit from anywhere (just import and run tools.web_dev_style.presubmit_support.CheckStyle(input_api, output_api))

Sign in to add a comment