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:
4
Makefile
4
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
|
||||
|
3
rustfmt-nightly.toml
Normal file
3
rustfmt-nightly.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
group_imports = "StdExternalCrate"
|
||||
imports_granularity = "Crate"
|
||||
max_width = 120
|
Reference in New Issue
Block a user