pre-commit 门禁:trailing-whitespace 排除 CMSIS/HAL_Driver/Middlewares(CubeMX 重生成空白抖动)

This commit is contained in:
2026-09-20 02:22:14 +08:00
parent 0788b75cd2
commit 3dd402f0bd
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -16,6 +16,14 @@ repos:
rev: v5.0.0
hooks:
- id: trailing-whitespace
# 排除第三方库(CubeMX 重生成会带回行尾空白,避免每次重生成产生提交抖动);
# 自研代码(Drivers/BSP、Src、Inc、App 等)不受影响
exclude: |
(?x)^(
Drivers/CMSIS/|
Drivers/STM32F4xx_HAL_Driver/|
Middlewares/
)
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-merge-conflict