Add cargo fmt to CI and delete rustfmt.toml#5176
Conversation
|
r? @matklad (rust_highfive has picked a reviewer for you, use r? to override) |
|
Spot checking this it all looks pretty good to me, but it definitely wreaks havoc on the formatting in the tests. I figure we can try to touch things up there as we go along? |
|
I've managed to fix horrendous formatting of single line strings with a bit of regex magic and reformatting with rustfmt again, you might want to cherry-pick this commit: matklad@eb85b79 I have no idea what to do with multiline strings, I am not sure that "we can try to touch things up there as we go along", because every touch-up I've tried didn't produce a satisfactory result. But multiline strings don't look that bad. Also, not that our tests were particularly pretty beforehand :) Could we remove that sh script that checked for line lengths? Or is still needed for docs? |
|
Nice! I'll definitely throw that on before merging. I also agree that the tests haven't really ever been too too pretty. I'm not too too worried in that tests are quite commonly write-once-read-never, but I'm also totally ok jumping on the "blindly run on I had forgotten we had a line-length script, although it looks like it's not actually run anywhere! I'll delete it here |
|
r=me with script removed and the patch applied! Overall, this looks awesome, but that's because I am a person myself, rather than :) |
|
☔ The latest upstream changes (presumably #5181) made this pull request unmergeable. Please resolve the merge conflicts. |
This commit adds CI to run `cargo fmt` over Cargo itself as well as the internal `crates-io` crate. This should switch Cargo to the "default style" (aka whatever rustfmt spits out) and ensure that we keep it that way via CI. Hopefully this won't be too much of a bother to keep up and running in CI as it should just be a `cargo fmt` away!
|
@bors: r+ Say goodbye to everything in Cargo's queue... |
|
📌 Commit b0c181d has been approved by |
|
⌛ Testing commit b0c181d with merge 02918fafd5a469afada0094e0fae1f017195177e... |
|
💔 Test failed - status-travis |
|
@bors: r+ |
|
📌 Commit 358b9f7 has been approved by |
|
⌛ Testing commit 358b9f79db97025d476ce3260714d2a9f74517f2 with merge a12dd42da5b8e6ced0ac345ed319a64d95041032... |
|
💔 Test failed - status-appveyor |
Needs a workaround until rust-lang/rust#49033 is fixed
|
@bors: r+ |
|
📌 Commit 3d85814 has been approved by |
Add `cargo fmt` to CI and delete `rustfmt.toml` This commit adds CI to run `cargo fmt` over Cargo itself as well as the internal `crates-io` crate. This should switch Cargo to the "default style" (aka whatever rustfmt spits out) and ensure that we keep it that way via CI. Hopefully this won't be too much of a bother to keep up and running in CI as it should just be a `cargo fmt` away!
|
☀️ Test successful - status-appveyor, status-travis |
Normalize raw string indentation. It has always slightly bugged me how strings were indented after rustfmt was run across the repo (#5176). This attempts to normalize the strings so that they open and close on the same column. This only touches the `tests` directory.
This commit adds CI to run
cargo fmtover Cargo itself as well as the internalcrates-iocrate. This should switch Cargo to the "default style" (aka whateverrustfmt spits out) and ensure that we keep it that way via CI. Hopefully this
won't be too much of a bother to keep up and running in CI as it should just be
a
cargo fmtaway!