From c1caf189c4df16b08bd29c75ddf20eadc4e0114f Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 15 Jul 2022 15:42:18 -0400 Subject: [PATCH] Add justfile and update rustfmt options --- justfile | 32 ++++++++++++++++++++++++++++++++ rustfmt.toml | 7 +++++++ 2 files changed, 39 insertions(+) create mode 100644 justfile create mode 100644 rustfmt.toml diff --git a/justfile b/justfile new file mode 100644 index 0000000..dec3bb1 --- /dev/null +++ b/justfile @@ -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 \ No newline at end of file diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..c9918d7 --- /dev/null +++ b/rustfmt.toml @@ -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