1
1
mirror of https://github.com/Byron/gitoxide synced 2025-10-06 01:52:40 +02:00

Add make rustfmt target.

This is intended to be run on occasion to let us take advantage of
rustfmt features available only in nightly while not requiring all
contributors and CI to use nightly rustfmt.

If the output of nightly rustfmt is not accepted by stable rustfmt, then
the recipe will intentionally fail. For now, we prefer to detect when
the two versions disagree on formatting rather than let nightly and
stable rustfmt stomp on each other.
This commit is contained in:
Conor Davis
2021-08-13 22:22:07 -05:00
parent a3c45de6b0
commit 47c128d6e9
2 changed files with 7 additions and 0 deletions

View File

@@ -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

3
rustfmt-nightly.toml Normal file
View File

@@ -0,0 +1,3 @@
group_imports = "StdExternalCrate"
imports_granularity = "Crate"
max_width = 120