Skip to content

Commit 513b812

Browse files
committed
Improve fix
1 parent 9c4a193 commit 513b812

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- Imports: std first, then external crates, then local modules
2323
- Naming: snake_case functions/variables, PascalCase types, SCREAMING_SNAKE_CASE constants
2424
- Error handling: Result/Option types preferred over panics
25-
- Run `./check.sh` after changes to ensure no warnings/errors
25+
- Run `./fix.sh and ./check.sh` after changes to ensure no warnings/errors
2626
- Use eprintln for adding debug prints to code and tests when debuggin
2727

2828

fix.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/usr/bin/env bash
2-
# This scripts runs various CI-like checks in a convenient way.
2+
# This script automatically fixes issues found by check.sh
33
set -eu
44

5+
# Format all code
56
cargo fmt --all -q
6-
cargo fix --lib -p simu --allow-dirty
7+
8+
# Fix all auto-fixable issues (works even with staged/dirty files)
9+
cargo fix --quiet --workspace --all-targets --allow-dirty --allow-staged
10+
11+
# Fix clippy warnings (works even with staged/dirty files)
12+
cargo clippy --quiet --workspace --all-targets --all-features --fix --allow-dirty --allow-staged -- -D warnings -W clippy::all

0 commit comments

Comments
 (0)