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

Issue 9323016: [WebUI] Add some presubmit checks (Closed)

Created:
8 years, 10 months ago by Dan Beam
Modified:
8 years, 10 months ago
CC:
chromium-reviews, Dirk Pranke
Visibility:
Public.

Description

[WebUI] Add some presubmit checks to make WebUI resources follow the Chromium "Web Development Style Guide". <http://www.chromium.org/developers/web-development-style-guide>; R=estade@chromium.org,maruel@chromium.org,jhawkins@chromium.org BUG=None TEST=python chrome/browser/resources/PRESUBMIT.py and run automatically when the file's in the CL. NOTRY=true Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=122054

Patch Set 1 #

Patch Set 2 : fixing hex values and other stuff #

Patch Set 3 : fixes #

Total comments: 10

Patch Set 4 : moving, tweaking, still much to do #

Patch Set 5 : most rules working well, need to find home for tests (and write them) #

Total comments: 8

Patch Set 6 : review comments and tests #

Total comments: 3

Patch Set 7 : review comments from estade and tbreisacher #

Patch Set 8 : fixed false negative, changed dir handling #

Total comments: 1

Patch Set 9 : modularizing #

Total comments: 8

Patch Set 10 : remove debug messages #

Total comments: 11

Patch Set 11 : review comments #

Total comments: 7

Patch Set 12 : review comments #

Total comments: 2

Patch Set 13 : try: finally: around path modifier #

Patch Set 14 : adding find_depot_tools #

Total comments: 4

Patch Set 15 : unfiltering .html and .js #

Patch Set 16 : some pylint nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+522 lines, --1 lines) Patch
A chrome/browser/resources/PRESUBMIT.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +52 lines, -0 lines 0 comments Download
A chrome/browser/resources/test_presubmit.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +264 lines, -0 lines 0 comments Download
A chrome/browser/resources/web_dev_style/__init__.py View 1 2 3 4 5 6 7 8 9 10 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/resources/web_dev_style/css_checker.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +207 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
Evan Stade
http://codereview.chromium.org/9323016/diff/3/presubmit_canned_checks.py File presubmit_canned_checks.py (right): http://codereview.chromium.org/9323016/diff/3/presubmit_canned_checks.py#newcode875 presubmit_canned_checks.py:875: resources = lambda x: input_api.FilterSourceFile(x, black_list=black_list, # TODO(dbeam): add ...
8 years, 10 months ago (2012-02-03 04:13:14 UTC) #1
Dan Beam
wait for just a little while on this, maruel@ and estade@ http://codereview.chromium.org/9323016/diff/3/presubmit_canned_checks.py File presubmit_canned_checks.py (right): ...
8 years, 10 months ago (2012-02-03 04:29:18 UTC) #2
M-A Ruel
http://codereview.chromium.org/9323016/diff/3/presubmit_canned_checks.py File presubmit_canned_checks.py (right): http://codereview.chromium.org/9323016/diff/3/presubmit_canned_checks.py#newcode7 presubmit_canned_checks.py:7: import re No need, input_api.re http://codereview.chromium.org/9323016/diff/3/presubmit_canned_checks.py#newcode876 presubmit_canned_checks.py:876: white_list='.*chrome/browser/resources/(?:options2|ntp4).*\.(?j:cs)s$') This ...
8 years, 10 months ago (2012-02-03 16:41:34 UTC) #3
Dan Beam
https://chromiumcodereview.appspot.com/9323016/diff/3/presubmit_canned_checks.py File presubmit_canned_checks.py (right): https://chromiumcodereview.appspot.com/9323016/diff/3/presubmit_canned_checks.py#newcode7 presubmit_canned_checks.py:7: import re On 2012/02/03 16:41:35, Marc-Antoine Ruel wrote: > ...
8 years, 10 months ago (2012-02-04 07:26:21 UTC) #4
M-A Ruel
https://chromiumcodereview.appspot.com/9323016/diff/5/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/9323016/diff/5/chrome/browser/resources/PRESUBMIT.py#newcode13 chrome/browser/resources/PRESUBMIT.py:13: import os Please use input_api.os_path and input_api.re instead. https://chromiumcodereview.appspot.com/9323016/diff/5/chrome/browser/resources/PRESUBMIT.py#newcode20 ...
8 years, 10 months ago (2012-02-06 20:40:51 UTC) #5
Dan Beam
ptal, added tests and rewrote a bit of the checks https://chromiumcodereview.appspot.com/9323016/diff/5/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/9323016/diff/5/chrome/browser/resources/PRESUBMIT.py#newcode13 ...
8 years, 10 months ago (2012-02-08 11:42:48 UTC) #6
M-A Ruel
Isn't https://chromiumcodereview.appspot.com/9288045/ a superset of this CL?
8 years, 10 months ago (2012-02-08 14:31:47 UTC) #7
Dan Beam
On 2012/02/08 14:31:47, Marc-Antoine Ruel wrote: > Isn't https://chromiumcodereview.appspot.com/9288045/ a superset of this CL? No, ...
8 years, 10 months ago (2012-02-08 19:48:31 UTC) #8
Dan Beam
+tbreisacher for review given his (convincingly similar, :D) work.
8 years, 10 months ago (2012-02-08 19:49:59 UTC) #9
Dan Beam
ping
8 years, 10 months ago (2012-02-09 02:34:45 UTC) #10
James Hawkins
Logic lgtm; will wait on Marc-Antoine for final LG.
8 years, 10 months ago (2012-02-09 02:36:42 UTC) #11
Tyler Breisacher (Chromium)
https://chromiumcodereview.appspot.com/9323016/diff/13002/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/9323016/diff/13002/chrome/browser/resources/PRESUBMIT.py#newcode208 chrome/browser/resources/PRESUBMIT.py:208: for f in filter(lambda l: l[0].endswith('.css'), files): nit: Lowercase ...
8 years, 10 months ago (2012-02-09 02:46:06 UTC) #12
Dan Beam
http://codereview.chromium.org/9323016/diff/13002/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): http://codereview.chromium.org/9323016/diff/13002/chrome/browser/resources/PRESUBMIT.py#newcode208 chrome/browser/resources/PRESUBMIT.py:208: for f in filter(lambda l: l[0].endswith('.css'), files): On 2012/02/09 ...
8 years, 10 months ago (2012-02-09 02:52:30 UTC) #13
Dan Beam
estade: fixed 80 char wrap just for you. http://codereview.chromium.org/9323016/diff/13002/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): http://codereview.chromium.org/9323016/diff/13002/chrome/browser/resources/PRESUBMIT.py#newcode208 chrome/browser/resources/PRESUBMIT.py:208: for ...
8 years, 10 months ago (2012-02-09 02:58:28 UTC) #14
M-A Ruel
http://codereview.chromium.org/9323016/diff/19002/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): http://codereview.chromium.org/9323016/diff/19002/chrome/browser/resources/PRESUBMIT.py#newcode15 chrome/browser/resources/PRESUBMIT.py:15: from testing_support.super_mox import SuperMoxTestBase, mox As I said before, ...
8 years, 10 months ago (2012-02-09 14:09:46 UTC) #15
M-A Ruel
https://chromiumcodereview.appspot.com/9323016/diff/20002/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/9323016/diff/20002/chrome/browser/resources/PRESUBMIT.py#newcode39 chrome/browser/resources/PRESUBMIT.py:39: except ImportError: I'd do it unconditionally to reduce variation. ...
8 years, 10 months ago (2012-02-09 22:14:14 UTC) #16
Dan Beam
https://chromiumcodereview.appspot.com/9323016/diff/20002/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/9323016/diff/20002/chrome/browser/resources/PRESUBMIT.py#newcode39 chrome/browser/resources/PRESUBMIT.py:39: except ImportError: On 2012/02/09 22:14:14, Marc-Antoine Ruel wrote: > ...
8 years, 10 months ago (2012-02-14 17:02:01 UTC) #17
M-A Ruel
You forgot to upload. https://chromiumcodereview.appspot.com/9323016/diff/22002/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/9323016/diff/22002/chrome/browser/resources/PRESUBMIT.py#newcode29 chrome/browser/resources/PRESUBMIT.py:29: if presubmit in [f.AbsoluteLocalPath() for ...
8 years, 10 months ago (2012-02-14 17:15:19 UTC) #18
Dan Beam
https://chromiumcodereview.appspot.com/9323016/diff/22002/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/9323016/diff/22002/chrome/browser/resources/PRESUBMIT.py#newcode29 chrome/browser/resources/PRESUBMIT.py:29: if presubmit in [f.AbsoluteLocalPath() for f in input_api.AffectedFiles()]: On ...
8 years, 10 months ago (2012-02-14 17:48:46 UTC) #19
Dan Beam
https://chromiumcodereview.appspot.com/9323016/diff/24001/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/9323016/diff/24001/chrome/browser/resources/PRESUBMIT.py#newcode29 chrome/browser/resources/PRESUBMIT.py:29: if presubmit in (f.AbsoluteLocalPath() for f in input_api.AffectedFiles()): On ...
8 years, 10 months ago (2012-02-14 17:49:30 UTC) #20
Dan Beam
> You forgot to upload. No coffee yet, uploaded now.
8 years, 10 months ago (2012-02-14 17:50:40 UTC) #21
M-A Ruel
On 2012/02/14 17:48:46, Dan Beam wrote: > > I often use an adhoc script to ...
8 years, 10 months ago (2012-02-14 18:03:36 UTC) #22
Dan Beam
https://chromiumcodereview.appspot.com/9323016/diff/24001/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/9323016/diff/24001/chrome/browser/resources/PRESUBMIT.py#newcode35 chrome/browser/resources/PRESUBMIT.py:35: sys.path.insert(0, resources) On 2012/02/14 18:03:36, Marc-Antoine Ruel wrote: > ...
8 years, 10 months ago (2012-02-14 21:29:12 UTC) #23
M-A Ruel
https://chromiumcodereview.appspot.com/9323016/diff/12004/chrome/browser/resources/PRESUBMIT.py File chrome/browser/resources/PRESUBMIT.py (right): https://chromiumcodereview.appspot.com/9323016/diff/12004/chrome/browser/resources/PRESUBMIT.py#newcode35 chrome/browser/resources/PRESUBMIT.py:35: sys.path.insert(0, resources) I had meant to call sys.path.insert() all ...
8 years, 10 months ago (2012-02-14 22:15:09 UTC) #24
Dan Beam
https://chromiumcodereview.appspot.com/9323016/diff/22002/chrome/browser/resources/test_presubmit.py File chrome/browser/resources/test_presubmit.py (right): https://chromiumcodereview.appspot.com/9323016/diff/22002/chrome/browser/resources/test_presubmit.py#newcode12 chrome/browser/resources/test_presubmit.py:12: from testing_support.super_mox import SuperMoxTestBase On 2012/02/14 17:15:19, Marc-Antoine Ruel ...
8 years, 10 months ago (2012-02-15 01:07:43 UTC) #25
M-A Ruel
lgtm
8 years, 10 months ago (2012-02-15 01:21:42 UTC) #26
Tyler Breisacher (Chromium)
https://chromiumcodereview.appspot.com/9323016/diff/14003/chrome/browser/resources/web_dev_style/css_checker.py File chrome/browser/resources/web_dev_style/css_checker.py (right): https://chromiumcodereview.appspot.com/9323016/diff/14003/chrome/browser/resources/web_dev_style/css_checker.py#newcode71 chrome/browser/resources/web_dev_style/css_checker.py:71: return line.find('"') >= 0 the argument is "lines" but ...
8 years, 10 months ago (2012-02-15 01:22:40 UTC) #27
Dan Beam
https://chromiumcodereview.appspot.com/9323016/diff/14003/chrome/browser/resources/web_dev_style/css_checker.py File chrome/browser/resources/web_dev_style/css_checker.py (right): https://chromiumcodereview.appspot.com/9323016/diff/14003/chrome/browser/resources/web_dev_style/css_checker.py#newcode71 chrome/browser/resources/web_dev_style/css_checker.py:71: return line.find('"') >= 0 On 2012/02/15 01:22:41, Tyler Breisacher ...
8 years, 10 months ago (2012-02-15 01:39:53 UTC) #28
Tyler Breisacher (Chromium)
On 2012/02/15 01:39:53, Dan Beam wrote: > Make sense? Yup. We also might want to ...
8 years, 10 months ago (2012-02-15 01:43:48 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dbeam@chromium.org/9323016/27001
8 years, 10 months ago (2012-02-15 01:46:40 UTC) #30
commit-bot: I haz the power
Presubmit check for 9323016-27001 failed and returned exit status 1. warning: code.google.com certificate with fingerprint ...
8 years, 10 months ago (2012-02-15 01:53:14 UTC) #31
M-A Ruel
On 2012/02/15 01:53:14, I haz the power (commit-bot) wrote: > Presubmit check for 9323016-27001 failed ...
8 years, 10 months ago (2012-02-15 02:11:59 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dbeam@chromium.org/9323016/15006
8 years, 10 months ago (2012-02-15 02:39:57 UTC) #33
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
8 years, 10 months ago (2012-02-15 04:21:26 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dbeam@chromium.org/9323016/15006
8 years, 10 months ago (2012-02-15 06:18:41 UTC) #35
commit-bot: I haz the power
8 years, 10 months ago (2012-02-15 06:18:57 UTC) #36
Change committed as 122054

Powered by Google App Engine
This is Rietveld 408576698