Skip to content

Commit

Permalink
Add rustfmt.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
yukibtc committed Jan 19, 2024
1 parent 21762ba commit f6b2f21
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 6 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
fmt:
cargo fmt --all -- --config format_code_in_doc_comments=true
rustup install nightly-2024-01-11
rustup component add rustfmt --toolchain nightly-2024-01-11
cargo +nightly-2024-01-11 fmt --all -- --config format_code_in_doc_comments=true

check: fmt check-crates check-crates-msrv check-bindings check-docs

check-fmt:
cargo fmt --all -- --config format_code_in_doc_comments=true --check
rustup install nightly-2024-01-11
rustup component add rustfmt --toolchain nightly-2024-01-11
cargo +nightly-2024-01-11 fmt --all -- --config format_code_in_doc_comments=true --check

check-bindings:
@bash contrib/scripts/check-bindings.sh
Expand Down
9 changes: 9 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tab_spaces = 4
newline_style = "Auto"
reorder_imports = true
reorder_modules = true
indent_style = "Block"
normalize_comments = true
imports_granularity = "Module"
reorder_impl_items = true
group_imports = "StdExternalCrate"

0 comments on commit f6b2f21

Please sign in to comment.