Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upEnforce rustfmt on CI #22126
Enforce rustfmt on CI #22126
Conversation
highfive
commented
Nov 6, 2018
|
Heads up! This PR modifies the following files:
|
highfive
commented
Nov 6, 2018
|
Yes this is a replacement for #20617. Rustfmt is now installed with rustup and not with cargo anymore. |
|
If we do this, which makes more annoying for me to port Gecko changes, can we enable the reordering of imports and such, and remove the tidy one? At least that'd be roughly neutral or even positive on the effort it takes me :) Also, maybe, remove the |
| @@ -304,6 +304,12 @@ def test_content(self): | |||
| "tests/wpt/mozilla/.") | |||
| return 0 | |||
|
|
|||
| def install_rustfmt(self): | |||
| if self.call_rustup_run(["cargo", "fmt", "--version", "-q"], | |||
| stderr=open(os.devnull, "w")) != 0: | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Let's have two more commits - one that disables the tidy check for import ordering, and one that enables rustfmt import reordering and formats the whole tree with it. |
|
@bors-servo r+ |
|
|
|
@bors-servo r- |
|
Also apparently travis is not set up to run cargo fmt yet:
|
|
And the selftests failed:
|
|
I've pushed the two commits as suggested by @jdm. There are still a few problems with this PR:
|
|
|
|
Rebased and fixed. Lets see if it works in Travis. |
|
Install rustup on first Travis job. Only use rustfmt::skip as an outer attribute.
|
Travis now passes. AppVeyor has some connectivity issues:
|
|
@bors-servo r+ |
|
|
Enforce rustfmt on CI <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22126) <!-- Reviewable:end -->
|
|
|
Nice! @pyfisch, are you subscribed to the dev-servo mailing list? I think it’d be nice to send an announcement there with:
If you prefer I can do it for you :) |
|
Sent an email. |
pyfisch commentedNov 6, 2018
•
edited by SimonSapin
This change is