Skip to content

Commit 458ab02

Browse files
sbernauerrazvan
andauthored
chore: Add rustfmt.toml with some unstable format options (#477)
* chore: Add rustfmt.toml * fix: use nightly for cargo fmt * Use nightly-2025-01-15 toolchain * Add comment --------- Co-authored-by: Razvan-Daniel Mihai <[email protected]>
1 parent 0f67323 commit 458ab02

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

template/.pre-commit-config.yaml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ repos:
1818
rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0
1919
hooks:
2020
- id: fmt
21+
# Pinning to a specific rustc version, so that we get consistent formatting
22+
entry: RUSTUP_TOOLCHAIN=nightly-2025-01-15 cargo fmt
2123
args: ["--all", "--", "--check"]
2224
- id: clippy
2325
args: ["--all-targets", "--", "-D", "warnings"]

rustfmt.toml renamed to template/rustfmt.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
# It's also ok to use the stable toolchain by simple running "cargo fmt", but using the nigthly formatter is prefered.
33

44
imports_granularity = "Crate"
5+
group_imports = "StdExternalCrate"

0 commit comments

Comments
 (0)