From 50ebb0c0a92bf90209287349cd647f8df0b891f5 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Tue, 31 Mar 2026 22:47:32 -0700 Subject: [PATCH] =?UTF-8?q?chore(dev-script):=20=F0=9F=94=A7=20Update=20de?= =?UTF-8?q?v.sh=20script=20for=20improved=20local=20workflows=20with=20env?= =?UTF-8?q?ironment=20variables,=20service=20commands,=20and=20dependency?= =?UTF-8?q?=20management?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- scripts/run/dev.sh | 51 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/scripts/run/dev.sh b/scripts/run/dev.sh index ddf426c3..5f63bd8a 100644 --- a/scripts/run/dev.sh +++ b/scripts/run/dev.sh @@ -16,23 +16,42 @@ cmd_editor() { } cmd_lint() { - echo -e "${BLUE}Checking gdtoolkit config sync...${NC}" + local exit_code=0 + + echo -e "${BLUE}[1/3] GDScript lint...${NC}" lilith-gdtoolkit-sync --check || { echo -e "${YELLOW}Config drift detected — syncing...${NC}" lilith-gdtoolkit-sync } - echo -e "${BLUE}Linting src/game/engine/src/...${NC}" - gdlint "$GAME_DIR/engine/src/" "$@" + gdlint "$GAME_DIR/engine/src/" || exit_code=$? + + echo "" + echo -e "${BLUE}[2/3] Rust lint (fmt + clippy)...${NC}" + (cd "$SIMULATOR_DIR" && cargo fmt --check --all) || exit_code=$? + (cd "$SIMULATOR_DIR" && cargo clippy --workspace --all-targets -- -D warnings) || exit_code=$? + + echo "" + echo -e "${BLUE}[3/3] Guide lint (ESLint)...${NC}" + pnpm --prefix "$GUIDE_DIR" lint || exit_code=$? + + return $exit_code } cmd_format() { - echo -e "${BLUE}Checking gdtoolkit config sync...${NC}" + echo -e "${BLUE}[1/3] GDScript format...${NC}" lilith-gdtoolkit-sync --check || { echo -e "${YELLOW}Config drift detected — syncing...${NC}" lilith-gdtoolkit-sync } - echo -e "${BLUE}Formatting src/game/engine/src/...${NC}" - gdformat "$GAME_DIR/engine/src/" "$@" + gdformat "$GAME_DIR/engine/src/" + + echo "" + echo -e "${BLUE}[2/3] Rust format...${NC}" + (cd "$SIMULATOR_DIR" && cargo fmt --all) + + echo "" + echo -e "${BLUE}[3/3] Guide format (ESLint --fix)...${NC}" + pnpm --prefix "$GUIDE_DIR" lint:fix } cmd_test() { @@ -58,19 +77,31 @@ cmd_test() { cmd_verify() { local exit_code=0 - echo -e "${BLUE}[1/4] GDScript lint...${NC}" + echo -e "${BLUE}[1/7] GDScript lint...${NC}" gdlint "$GAME_DIR/engine/src/" || exit_code=$? echo "" - echo -e "${BLUE}[2/4] Guide typecheck...${NC}" + echo -e "${BLUE}[2/7] Guide typecheck...${NC}" pnpm --prefix "$GUIDE_DIR" typecheck || exit_code=$? echo "" - echo -e "${BLUE}[3/4] Rust build check (simulator)...${NC}" + echo -e "${BLUE}[3/7] Guide lint (ESLint)...${NC}" + pnpm --prefix "$GUIDE_DIR" lint || exit_code=$? + + echo "" + echo -e "${BLUE}[4/7] Rust fmt check...${NC}" + (cd "$SIMULATOR_DIR" && cargo fmt --check --all) || exit_code=$? + + echo "" + echo -e "${BLUE}[5/7] Rust clippy...${NC}" + (cd "$SIMULATOR_DIR" && cargo clippy --workspace --all-targets -- -D warnings) || exit_code=$? + + echo "" + echo -e "${BLUE}[6/7] Rust build check...${NC}" (cd "$SIMULATOR_DIR" && cargo check --workspace) || exit_code=$? echo "" - echo -e "${BLUE}[4/4] Tests (GUT + Rust + vitest)...${NC}" + echo -e "${BLUE}[7/7] Tests (GUT + Rust + vitest)...${NC}" cmd_test || exit_code=$? echo ""