From: Alex Crichton Date: Wed, 14 Mar 2018 15:14:56 +0000 (-0700) Subject: Add `cargo fmt` to CI and delete `rustfmt.toml` X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~2^2~41^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a13a33c33b049a7b412f0cc80a7b166b0d58345c;p=cargo.git 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! --- 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