From 1f9f52485de17a2485c61773ef4bf79f01984c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=85=E6=88=8E=E6=B0=8F?= Date: Wed, 27 Mar 2024 12:27:16 +0800 Subject: [PATCH] build(clang-format): skip plugins directories --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index db306332b..58784112a 100644 --- a/Makefile +++ b/Makefile @@ -40,10 +40,11 @@ install-debug uninstall-debug all: release clang-format-lint: - find ${RIME_SOURCE_PATH} -name '*.cc' -o -name '*.h' | xargs clang-format -Werror --dry-run || { echo Please lint your code by '"'"make clang-format-apply"'"'.; false; } + find ${RIME_SOURCE_PATH} \! -path 'plugins/*/*' -a \( -name '*.cc' -o -name '*.h' \) | \ + xargs clang-format -Werror --dry-run || { echo Please lint your code by '"'"make clang-format-apply"'"'.; false; } clang-format-apply: - find ${RIME_SOURCE_PATH} -name '*.cc' -o -name '*.h' | xargs clang-format --verbose -i + find ${RIME_SOURCE_PATH} \! -path 'plugins/*/*' -a \( -name '*.cc' -o -name '*.h' \) | xargs clang-format --verbose -i deps: $(MAKE) -f deps.mk