From a13a33c33b049a7b412f0cc80a7b166b0d58345c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 14 Mar 2018 08:14:56 -0700 Subject: [PATCH] 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! --- .travis.yml | 3 +++ rustfmt.toml | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) delete mode 100644 rustfmt.toml diff --git a/.travis.yml b/.travis.yml index f03698190..a409d26b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 index c7ad93baf..000000000 --- a/rustfmt.toml +++ /dev/null @@ -1 +0,0 @@ -disable_all_formatting = true