Add justfile and update rustfmt options
This commit is contained in:
parent
da39b2fc9c
commit
c1caf189c4
32
justfile
Normal file
32
justfile
Normal file
@ -0,0 +1,32 @@
|
||||
# Lists the available actions
|
||||
default:
|
||||
@just --list
|
||||
|
||||
# Remove generated files
|
||||
clean:
|
||||
cargo clean
|
||||
|
||||
# Check code syntax
|
||||
check:
|
||||
cargo check
|
||||
|
||||
# Generate API docs
|
||||
docs:
|
||||
cargo doc
|
||||
|
||||
# Check code style
|
||||
lint:
|
||||
cargo clippy
|
||||
|
||||
# Format the code
|
||||
fmt:
|
||||
cargo +nightly fmt
|
||||
|
||||
# Automatically fix some code syntax/style issues
|
||||
fix:
|
||||
cargo fix --allow-dirty --allow-staged
|
||||
just fmt
|
||||
|
||||
# Run the normal tests
|
||||
test:
|
||||
cargo test
|
7
rustfmt.toml
Normal file
7
rustfmt.toml
Normal file
@ -0,0 +1,7 @@
|
||||
unstable_features = true
|
||||
format_code_in_doc_comments = true
|
||||
format_macro_matchers = true
|
||||
format_strings = false
|
||||
imports_granularity = "Module"
|
||||
group_imports = "StdExternalCrate"
|
||||
use_field_init_shorthand = true
|
Loading…
Reference in New Issue
Block a user