diff --git a/template/.pre-commit-config.yaml.j2 b/template/.pre-commit-config.yaml.j2 index 3c59d32e..a36fdcb7 100644 --- a/template/.pre-commit-config.yaml.j2 +++ b/template/.pre-commit-config.yaml.j2 @@ -18,6 +18,8 @@ repos: rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0 hooks: - id: fmt + # Pinning to a specific rustc version, so that we get consistent formatting + entry: RUSTUP_TOOLCHAIN=nightly-2025-01-15 cargo fmt args: ["--all", "--", "--check"] - id: clippy args: ["--all-targets", "--", "-D", "warnings"] diff --git a/rustfmt.toml b/template/rustfmt.toml similarity index 87% rename from rustfmt.toml rename to template/rustfmt.toml index 6330bc08..e25d3967 100644 --- a/rustfmt.toml +++ b/template/rustfmt.toml @@ -2,3 +2,4 @@ # It's also ok to use the stable toolchain by simple running "cargo fmt", but using the nigthly formatter is prefered. imports_granularity = "Crate" +group_imports = "StdExternalCrate"