From 62fe87961fb008c1492729910fb52b306c5fa5c0 Mon Sep 17 00:00:00 2001 From: xfy Date: Mon, 29 Jun 2026 15:55:51 +0800 Subject: [PATCH] chore(build): add clippy and fix targets to Makefile --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dbadcf0..ebd869b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: dev build build-linux css css-watch clean build-editor build-editor-incremental build-lightbox build-lightbox-incremental build-core build-core-incremental highlight-css test doc doc-open start +.PHONY: dev build build-linux css css-watch clean build-editor build-editor-incremental build-lightbox build-lightbox-incremental build-core build-core-incremental highlight-css test doc doc-open start clippy fix build: @$(MAKE) build-editor @@ -75,6 +75,12 @@ test: @cd libs/lightbox && pnpm test @cd libs/yggdrasil-core && pnpm test +clippy: + @cargo clippy --all-targets --all-features -- -D warnings + +fix: + @cargo fix --allow-dirty + # 只编译当前 crate 的文档(--no-deps 跳过依赖,--document-private-items # 让纯 binary crate 的内部模块/私有项也进文档,否则页面基本是空的)。 # RUSTDOCFLAGS 把 rustdoc 的 --default-theme=ayu 透传过去——cargo doc 本身