suzmii
dd7cf401a9
补 lint-staged 的 Rust 守卫:pre-commit 也跑 check:rustfmt
- 新增 scripts/lint-staged-rustfmt.mjs:对 server-rs 与 apps/ai-game-creator-shell/src-tauri 两个 workspace 跑 cargo fmt --all --manifest-path <m> -- --check,只查不改
- 为什么需要包装脚本:lint-staged 会把命中的暂存文件路径追加到命令末尾,而 cargo fmt 只按 workspace 粒度格式化、不接受文件参数,直接写成 npm run check:rustfmt 会被多余参数打断;脚本因此忽略 argv,并按 workspace 逐个检查
- package.json 的 lint-staged 配置新增 "*.rs": ["node scripts/lint-staged-rustfmt.mjs"]
- 成因:原配置只覆盖 *.{js,mjs,cjs,ts,tsx},Rust 格式在本地完全没有守卫,唯一防线是 CI 的 check:rustfmt,本 PR 已因此红过一次(见 15660a98b)
- 已实测:把包装脚本直接跑一遍 exit 0;lint-staged 分派层面确认 "*.rs" 任务会被真的触发(对 6 个 .rs 文件跑通);脚本本身过 eslint 与 prettier --check
2026-09-11 21:24:43 +08:00
..
2026-09-01 16:28:34 +08:00
2026-05-15 11:52:51 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-08-12 14:46:24 +08:00
2026-08-27 17:10:17 +08:00
2026-09-01 16:28:34 +08:00
2026-08-28 17:09:02 +08:00
2026-09-01 16:28:34 +08:00
2026-08-22 13:17:26 +08:00
2026-07-22 15:57:22 +08:00
2026-08-13 14:01:34 +08:00
2026-08-05 21:28:40 +08:00
2026-09-03 15:33:26 +08:00
2026-09-01 16:28:34 +08:00
2026-07-27 21:57:30 +08:00
2026-09-01 19:23:55 +08:00
2026-08-28 21:44:20 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-07-17 22:07:52 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-06-17 23:00:28 +08:00
2026-09-01 16:28:34 +08:00
2026-06-17 20:16:51 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-06-17 20:16:51 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-03 11:38:40 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-07-23 18:06:29 +08:00
2026-09-01 16:28:34 +08:00
2026-08-21 12:20:43 +08:00
2026-08-27 17:10:17 +08:00
2026-09-01 16:28:34 +08:00
2026-09-03 12:57:01 +08:00
2026-08-21 12:20:43 +08:00
2026-08-21 12:20:43 +08:00
2026-09-01 16:28:34 +08:00
2026-07-13 13:39:59 +08:00
2026-08-07 19:22:46 +08:00
2026-09-01 16:28:34 +08:00
2026-08-28 17:09:02 +08:00
2026-08-28 17:09:02 +08:00
2026-07-10 18:28:06 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-06-03 22:11:46 +08:00
2026-09-09 20:08:04 +08:00
2026-09-09 20:08:04 +08:00
2026-09-09 20:08:04 +08:00
2026-09-05 19:10:49 +08:00
2026-05-26 00:13:08 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-08-21 12:20:43 +08:00
2026-08-22 13:17:26 +08:00
2026-07-20 20:56:36 +08:00
2026-06-19 21:38:07 +08:00
2026-05-02 17:04:11 +08:00
2026-06-05 16:14:30 +08:00
2026-08-23 04:11:18 +08:00
2026-05-15 17:10:07 +08:00
2026-09-03 11:38:40 +08:00
2026-08-27 21:46:56 +08:00
2026-08-12 22:06:35 +08:00
2026-09-11 21:24:43 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-08-12 22:06:35 +08:00
2026-08-27 17:10:17 +08:00
2026-08-15 17:18:10 +08:00
2026-08-31 10:53:30 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-07-13 13:39:59 +08:00
2026-06-30 17:12:13 +08:00
2026-07-17 16:56:46 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-08-22 11:52:14 +08:00
2026-08-22 11:52:14 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-08-24 21:44:44 +08:00
2026-08-27 17:10:17 +08:00
2026-09-10 20:00:58 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-07-17 16:56:46 +08:00
2026-08-27 21:46:56 +08:00
2026-09-01 16:28:34 +08:00
2026-08-28 17:09:02 +08:00
2026-08-27 22:18:16 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-07-20 20:45:15 +08:00
2026-08-06 16:57:38 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00
2026-09-01 16:28:34 +08:00