diff --git a/Makefile b/Makefile index 7b1a466ca5e..7d8d6996885 100644 --- a/Makefile +++ b/Makefile @@ -282,3 +282,7 @@ force-update-assets: ## As update-assets, but will run git to update the baselin check-size: ## Run cargo-diet on all crates to see that they are still in bound ./etc/check-package-size.sh + +rustfmt: ## run nightly rustfmt for its extra features, but check that it won't upset stable rustfmt + cargo +nightly fmt --all -- --config-path rustfmt-nightly.toml + cargo +stable fmt --all -- --check diff --git a/rustfmt-nightly.toml b/rustfmt-nightly.toml new file mode 100644 index 00000000000..1a25d9c9295 --- /dev/null +++ b/rustfmt-nightly.toml @@ -0,0 +1,3 @@ +group_imports = "StdExternalCrate" +imports_granularity = "Crate" +max_width = 120