CubeMX 生成 ADC1(9 通道)+ 复原重生成定制,FreeRTOS 加固迁 L1、钩子落 USER CODE 4/5,门禁豁免生成文件空白改写
This commit is contained in:
+15
-4
@@ -16,15 +16,26 @@ repos:
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
# 排除第三方库(CubeMX 重生成会带回行尾空白,避免每次重生成产生提交抖动);
|
||||
# 自研代码(Drivers/BSP、Src、Inc、App 等)不受影响
|
||||
exclude: |
|
||||
# 豁免 **CubeMX / Keil 生成的文件**(锚名 cubemx-generated,end-of-file-fixer 复用):
|
||||
# 这类文件的内容事实源是 `.ioc` 与工具链,每次重生成都按工具自己的风格写回
|
||||
# (行尾空白、文件末尾不带换行)。2026-10-09 实测:每次重生成后 `Src/`/`Inc/`
|
||||
# 下 10+ 个文件各被补 1 行末尾空行,纯属提交抖动。
|
||||
# ⚠ 只豁免**改写型**钩子(trailing-whitespace / end-of-file-fixer);
|
||||
# cppcheck / 乱码 / 存活审计 / 任务表 / 内存数字等**只读检查**仍覆盖
|
||||
# `Src/`、`Inc/`——`cubemx-survival` 必须能看到这些文件。
|
||||
exclude: &cubemx-generated |
|
||||
(?x)^(
|
||||
Src/.*\.(c|h)$|
|
||||
Inc/.*\.(c|h)$|
|
||||
Drivers/CMSIS/|
|
||||
Drivers/STM32F4xx_HAL_Driver/|
|
||||
Middlewares/
|
||||
Middlewares/|
|
||||
MDK-ARM/.*\.(uvprojx|uvoptx|sct|map)$|
|
||||
\.mxproject$|
|
||||
.*\.ioc$
|
||||
)
|
||||
- id: end-of-file-fixer
|
||||
exclude: *cubemx-generated
|
||||
- id: check-added-large-files
|
||||
- id: check-merge-conflict
|
||||
- id: check-yaml
|
||||
|
||||
Reference in New Issue
Block a user