chore(make): fix 目标新增 cargo fmt 与 dx fmt
自动修复流程此前只跑 biome format + cargo fix,缺少格式化收尾: cargo fix 应用编译器建议会重写代码,dx fmt 会改写 rsx!, 两者都可能留下不符合 rustfmt 风格的输出。 现在按 Biome → cargo fix → cargo fmt → dx fmt 顺序执行, 两道格式化收尾保证最终文件状态整洁。
This commit is contained in:
parent
886eeca915
commit
bdc9f0f711
8
Makefile
8
Makefile
@ -120,11 +120,17 @@ lint:
|
||||
@cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
||||
# JS + Rust 自动修复(直接写入文件)。
|
||||
# 顺序:Biome → cargo fix(应用编译器建议,重写代码)→ cargo fmt(格式化 Rust)
|
||||
# → dx fmt(格式化 RSX 宏)。两道格式化收尾,保证最终文件状态整洁。
|
||||
fix:
|
||||
@echo "==> Biome format (libs, 写入文件)"
|
||||
@cd libs && pnpm exec biome format --write .
|
||||
@echo "==> Cargo fix (Rust)"
|
||||
@echo "==> Cargo fix (Rust, 应用编译器建议)"
|
||||
@cargo fix --allow-dirty
|
||||
@echo "==> Cargo fmt (Rust, 格式化)"
|
||||
@cargo fmt
|
||||
@echo "==> Dioxus fmt (RSX 宏, 格式化)"
|
||||
@dx fmt
|
||||
|
||||
# 只编译当前 crate 的文档(--no-deps 跳过依赖,--document-private-items
|
||||
# 让纯 binary crate 的内部模块/私有项也进文档,否则页面基本是空的)。
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user