Skip to content

Improve style nit check for space after a comma - #7351

Closed
nerith wants to merge 1 commit into
servo:masterfrom
nerith:check
Closed

nerith wants to merge 1 commit into
servo:masterfrom
nerith:check

Conversation

@nerith

@nerith nerith commented Aug 25, 2015

Copy link
Copy Markdown
Contributor

Only a small number of things that followed a comma were flagged.
This improves the thoroughness of that check.

Fixes #7345.

Review on Reviewable

Only a small number of things that followed a comma were flagged.
This improves the thoroughness of that check.

Fixes servo#7345.
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 25, 2015
@jdm

jdm commented Aug 25, 2015

Copy link
Copy Markdown
Member

Could you perform a smoketest on this change by removing some spaces after commas in random files around the tree? I'd like to make sure that this still works :)

@jdm

jdm commented Aug 25, 2015

Copy link
Copy Markdown
Member

Oh, and be sure to run ./mach test-tidy after making those changes in order to make sure that errors are output for all of those modified places.

@jdm jdm added the S-awaiting-answer Someone asked a question that requires an answer. label Aug 25, 2015
@nerith

nerith commented Aug 25, 2015

Copy link
Copy Markdown
Contributor Author

It still works.

Output of ./mach test-tidy:

./components/net/mime_classifier.rs:105: missing space after ,
./components/profile_traits/time.rs:48: missing space after ,
./components/profile_traits/time.rs:73: missing space after ,
./components/profile_traits/time.rs:91: missing space after ,
./components/profile_traits/mem.rs:156: missing space after ,
./components/profile_traits/mem.rs:158: missing space after ,
./components/style/values.rs:10: missing space after ,
./components/style/values.rs:11: missing space after ,
./components/style/values.rs:13: missing space after ,
./components/style/values.rs:18: missing space after ,
./components/style/values.rs:24: missing space after ,
./components/style/values.rs:34: missing space after ,
./components/style/values.rs:42: missing space after ,
./components/style/values.rs:43: missing space after ,
./components/style/values.rs:45: missing space after ,
./components/style/values.rs:50: missing space after ,
./components/style/values.rs:54: missing space after ,
./components/style/values.rs:56: missing space after ,
./components/style/values.rs:66: missing space after ,
./components/style/values.rs:195: missing space after ,
./components/style/values.rs:824: missing space after ,
./components/style/values.rs:834: missing space after ,
./components/style/animation.rs:84: missing space after ,
./components/style/animation.rs:191: missing space after ,
./components/layout/incremental.rs:126: missing space after ,
./components/layout/css/matching.rs:170: missing space after ,
./components/layout/css/matching.rs:351: missing space after ,
./components/canvas/canvas_paint_task.rs:34: missing space after ,
./components/canvas/canvas_paint_task.rs:143: missing space after ,
./components/gfx/font.rs:33: missing space after ,
./components/devtools/protocol.rs:18: missing space after ,
./components/devtools/protocol.rs:23: missing space after ,
./components/devtools/protocol.rs:59: missing space after ,
./components/util/ipc.rs:29: missing space after ,
./components/util/cache.rs:79: missing space after ,
./components/util/opts.rs:438: missing space after ,
./components/util/str.rs:172: missing space after ,
./components/util/str.rs:280: missing space after ,
./components/util/str.rs:289: missing space after ,
./components/util/cursor.rs:15: missing space after ,
./components/util/cursor.rs:21: missing space after ,
./components/util/cursor.rs:30: missing space after ,
./components/util/task_state.rs:41: missing space after ,
./components/util/mem.rs:274: missing space after ,
./components/util/mem.rs:284: missing space after ,
./components/util/mem.rs:286: missing space after ,
./components/script/textinput.rs:165: missing space after ,
./components/script/document_loader.rs:63: missing space after ,
./components/script/dom/create.rs:97: missing space after ,
./components/script/dom/create.rs:98: missing space after ,
./components/script/dom/canvasrenderingcontext2d.rs:1166: missing space after ,
./components/script/dom/cssstyledeclaration.rs:42: missing space after ,
./components/script/dom/xmlhttprequest.rs:768: missing space after ,
./components/script/dom/xmlhttprequest.rs:1091: missing space after ,
./components/script/dom/macros.rs:220: missing space after ,
./components/script/dom/macros.rs:230: missing space after ,
./components/script/dom/macros.rs:231: missing space after ,
./components/plugins/jstraceable.rs:42: missing space after ,
./components/plugins/jstraceable.rs:50: missing space after ,
./components/plugins/lints/ban.rs:26: missing space after ,
./components/plugins/lints/ban.rs:32: missing space after ,

@jdm

jdm commented Aug 25, 2015

Copy link
Copy Markdown
Member

@bors-servo: r+
Perfect! Thanks for the PR :)

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit fc66956 has been approved by jdm

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-awaiting-answer Someone asked a question that requires an answer. labels Aug 25, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit fc66956 with merge 0b41ef2...

bors-servo pushed a commit that referenced this pull request Aug 25, 2015
Improve style nit check for space after a comma

Only a small number of things that followed a comma were flagged.
This improves the thoroughness of that check.

Fixes #7345.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7351)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux1

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 25, 2015
@jdm

jdm commented Aug 25, 2015

Copy link
Copy Markdown
Member

Oh, I totally didn't notice the test-tidy failures that were already reported by travis. We'll need to fix those before this can land, and we may need to add an exception for macros like http://mxr.mozilla.org/servo/source/components/profile_traits/mem.rs#158 . Perhaps ignore the match if a $ character is noticed on the same line?

@jdm

jdm commented Sep 1, 2015

Copy link
Copy Markdown
Member

@nerith Are you planning to continue working on this?

@nerith

nerith commented Sep 1, 2015

Copy link
Copy Markdown
Contributor Author

@jdm Yes. I'm still working on this.

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Sep 1, 2015
@nerith

nerith commented Sep 1, 2015

Copy link
Copy Markdown
Contributor Author

@jdm Refer to PR #7499 for this instead.

@jdm

jdm commented Sep 1, 2015

Copy link
Copy Markdown
Member

Just so you know for the future, it's possible to continue pushing commits to a branch and have them show up in an existing PR for that branch :)

@jdm jdm closed this Sep 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants