@@ -43,8 +43,16 @@ clean:
4343 @ echo ' ==> Cleaning project target/*'
4444 cargo clean
4545
46+ # Make sure we are running the right submodule versions
47+ update-submodules :
48+ git submodule update --init --recursive
49+
4650# Lint the project for any quality issues
47- lint : check fmt clippy commit-check
51+ lint : clippy fmt commit-check
52+
53+ unit : update-submodules lint test test-all
54+
55+ devloop : unit fmt-imports
4856
4957# Run project linter
5058clippy :
@@ -53,7 +61,7 @@ clippy:
5361
5462 if command -v cargo-clippy >/ dev/ null; then
5563 echo ' ==> Running clippy'
56- cargo clippy --workspace --all-features --tests -- -D clippy::all -W clippy:: style
64+ cargo clippy --workspace --all-features --all-targets -- -D warnings
5765 else
5866 echo ' ==> clippy not found in PATH, skipping'
5967 echo ' ^^^^^^ To install `rustup component add clippy`, see https://github.com/rust-lang/rust-clippy for details'
6674
6775 if command -v cargo-fmt >/ dev/ null; then
6876 echo ' ==> Running rustfmt'
69- cargo + nightly fmt --all -- --check
77+ cargo + nightly fmt --all
7078 else
7179 echo ' ==> rustfmt not found in PATH, skipping'
7280 echo ' ^^^^^^ To install `rustup component add rustfmt`, see https://github.com/rust-lang/rustfmt for details'
7381 fi
7482
83+ fmt-imports :
84+ #!/ bin/ bash
85+ set -euo pipefail
86+
87+ if command -v cargo-fmt >/ dev/ null; then
88+ echo ' ==> Running rustfmt'
89+ cargo + nightly fmt -- --config group_imports=StdExternalCrate,imports_granularity=One
90+ else
91+ echo ' ==> rustfmt not found in PATH, skipping'
92+ fi
93+
7594# Run commit checker
7695commit-check :
7796 #!/ bin/ bash
0 commit comments