Add `cargo fmt` to CI and delete `rustfmt.toml`
authorAlex Crichton <alex@alexcrichton.com>
Wed, 14 Mar 2018 15:14:56 +0000 (08:14 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 15 Mar 2018 00:47:13 +0000 (17:47 -0700)
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!

.travis.yml
rustfmt.toml [deleted file]

index f036981901ae0d4be0ad2f282a04caed373211b9..a409d26b862364bf8a102953385b2b1627bc0a1b 100644 (file)
@@ -36,6 +36,9 @@ matrix:
         - cargo doc --no-deps
         - (cd src/doc && mdbook build --dest-dir ../../target/doc)
 
+    - before_script: rustup component add rustfmt-preview
+      script: cargo fmt -- --write-mode diff
+
   exclude:
     - rust: stable
 
diff --git a/rustfmt.toml b/rustfmt.toml
deleted file mode 100644 (file)
index c7ad93b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-disable_all_formatting = true