Skip to content

Commit 1d3aaf3

Browse files
committed
ci: add fix-code
1 parent 70767d7 commit 1d3aaf3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scripts/fix-code.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
# This script formats the code using cargo fmt, runs cargo clippy with auto-fix,
5+
# and if any files were modified, stages and commits them.
6+
7+
echo "Running cargo fmt to format code..."
8+
cargo fmt --all
9+
10+
echo "Running cargo clippy with auto-fix (requires nightly)..."
11+
cargo clippy --all-features --workspace --fix --allow-dirty
12+
13+
echo "Running tests..."
14+
cargo test --all
15+

0 commit comments

Comments
 (0)