@@ -27,6 +27,16 @@ run() {
2727 " $@ "
2828}
2929
30+ cargo_fmt_workspace () {
31+ run cargo fmt \
32+ --manifest-path " $ROOT_DIR /Cargo.toml" \
33+ --package cellscript \
34+ --package cellscript-ckb-adapter \
35+ --package cellscript-wasm \
36+ --package cellscript-ckb-sdk-builder-example \
37+ " $@ "
38+ }
39+
3040python_syntax_check () {
3141 python3 - " $@ " << 'PY '
3242import sys
@@ -574,7 +584,7 @@ run_dev_gate() {
574584 require_cmd python3
575585 require_cmd rg
576586
577- run cargo fmt --all
587+ cargo_fmt_workspace
578588 run cargo check --locked -p cellscript --all-targets
579589 run ./scripts/cellscript_strict_backend_audit.sh quick
580590 run ./scripts/cellscript_syntax_combo_audit.sh quick
@@ -593,7 +603,7 @@ run_ci_gate() {
593603 require_cmd npm
594604
595605 printf ' {"status":"not-generated","reason":"test suite did not reach backend shape report generation"}\n' > " $CELLSCRIPT_BACKEND_SHAPE_REPORT "
596- run cargo fmt --all --check
606+ cargo_fmt_workspace --check
597607 run cargo test --locked -p cellscript -- --test-threads=1
598608 run cargo clippy --locked -p cellscript --all-targets -- -D warnings
599609 run ./scripts/cellscript_strict_backend_audit.sh ci
@@ -615,7 +625,7 @@ run_backend_gate() {
615625 require_cmd python3
616626 require_cmd rg
617627
618- run cargo fmt --all --check
628+ cargo_fmt_workspace --check
619629 run cargo check --locked -p cellscript --all-targets
620630 run cargo test --locked -p cellscript
621631 run cargo clippy --locked -p cellscript --all-targets -- -D warnings
0 commit comments