@rustlang folks: has anyone written the code to include "cargo fmt -- --write-mode=diff" in cargo test (that is, have a test fail for wrong formatting)?
-
-
i’ve actually worked on this! there’s a write mode called “check” that’ll attempt to format your code, and if the formatting succeeds, rustfmt exits with a non-zero exit code.
-
here's the PR in question:https://github.com/rust-lang-nursery/rustfmt/pull/2539 …
End of conversation
New conversation -
-
-
Yeah I mostly so it as an extra step in CI
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.