chore(gate): 门禁钩子改走 gate_python 启动器,worktree 统一插件模型
门禁解释器解耦
44 条 language: system 钩子此前把解释器写成仓库检出的绝对路径,换机、
换克隆目录都要重写。改为 entry 只写 scripts/gate_python.py + 脚本名,
由启动器按候选链解析:$DTU_GATE_PYTHON > <仓库>/.venv >
<仓库>/.gate/python > PATH。启动器用 execve 替换自身,并把选中的
解释器经 DTU_GATE_PYTHON 传给子进程,保证脚本内再调 Python 时一致。
实测 pre-commit 4.6.2 不展开 ${VAR};language: script 的 shebang 只做
纯 PATH 改写,会把决定权交给 PATH 首个 python,故不采用。
ci_local.py 预检识别启动器并报出解析结果。
并行工作树统一
task-worktree 新增 bench-gate(强制台架验收)与 merge(编排式合并),
删除 new/abort,done 标 DEPRECATED;台架通过记录改存
.agents/worktrees/.bench-pass-log。keil_build.py 的 plugin_tree_owner
识别 .agents/worktrees/<name> 并返回 pw:<name>。
check_doc_links / gen_refgraph / check_layer_deps 的扫描排除面补上
.agents;并行任务工作树方案重写为单一模型(7 节),取消工作树数量上限,
删历史实测记录节,两处 §7.3 悬空引用改为按语义引用。
文档与约定
本地工具路径环境变量方案 §5 重写为四节:谁跑在哪个 Python 上、写新钩子、
预检对号入座、动环境五步。文档规范的变更记录例外名单由 5 篇减为 4 篇
(本篇实际没有该节)。AGENTS.md 补委派验收口径三条。
验证:pre_commit run --all-files 48 钩子全 Passed;ci_local.py
--preflight-only 报 44 条经启动器 -> 仓库 .venv;keil-build 0 errors
0 warnings;check_doc_links --sections-strict 全通过。
This commit is contained in:
+44
-44
@@ -145,12 +145,12 @@ repos:
|
||||
pass_filenames: false
|
||||
- id: no-mojibake
|
||||
name: Forbid U+FFFD mojibake
|
||||
entry: python scripts/check_mojibake.py
|
||||
entry: scripts/gate_python.py scripts/check_mojibake.py
|
||||
language: system
|
||||
types: [c]
|
||||
- id: coding-standard
|
||||
name: C coding standard (规范V1.0)
|
||||
entry: python scripts/check_coding_standard.py
|
||||
entry: scripts/gate_python.py scripts/check_coding_standard.py
|
||||
language: system
|
||||
types: [c]
|
||||
# 范围与 cppcheck 钩子一致;另排除 CubeMX 生成文件(Src/、Inc/,重新生成即覆盖)、
|
||||
@@ -175,7 +175,7 @@ repos:
|
||||
# 章节:`§N.M` 必须能在目标文档的编号标题里找到(--sections-strict:自引用失效也拦)
|
||||
- id: doc-links
|
||||
name: 文档链接存在性
|
||||
entry: python scripts/check_doc_links.py --sections-strict
|
||||
entry: scripts/gate_python.py scripts/check_doc_links.py --sections-strict
|
||||
language: system
|
||||
files: \.md$
|
||||
# 外部资料(芯片手册转录)链接形态不受控;第三方目录整体排除
|
||||
@@ -200,7 +200,7 @@ repos:
|
||||
# sequence alt-else-end 不误伤 / 基线吞得下且清空后同命中算新发)。
|
||||
- id: mermaid-syntax
|
||||
name: "mermaid 围栏语法预检(图类型头 / 非法点线管道 / 块配对)"
|
||||
entry: python scripts/check_mermaid.py
|
||||
entry: scripts/gate_python.py scripts/check_mermaid.py
|
||||
language: system
|
||||
files: \.md$
|
||||
exclude: |
|
||||
@@ -213,7 +213,7 @@ repos:
|
||||
# 数值:README/AGENTS 任务表须与 Src/freertos.c 一致
|
||||
- id: task-table
|
||||
name: FreeRTOS 任务表一致性
|
||||
entry: python scripts/gen_task_table.py --check
|
||||
entry: scripts/gate_python.py scripts/gen_task_table.py --check
|
||||
language: system
|
||||
files: ^(README\.md|AGENTS\.md|Src/freertos\.c)$
|
||||
pass_filenames: false
|
||||
@@ -221,7 +221,7 @@ repos:
|
||||
# 只在内存文档或代码变动时触发;.map 未生成时脚本自身给出明确提示
|
||||
- id: mem-numbers
|
||||
name: 内存/Flash 数字一致性(体积档)
|
||||
entry: python scripts/check_mem_numbers.py --scan
|
||||
entry: scripts/gate_python.py scripts/check_mem_numbers.py --scan
|
||||
language: system
|
||||
files: ^(docs/内存管理/.*\.md|scripts/check_mem_numbers\.py|App/.*\.c|App/.*\.h|Src/.*\.c|Inc/.*\.h)$
|
||||
pass_filenames: false
|
||||
@@ -242,7 +242,7 @@ repos:
|
||||
# 实测对 local 钩子只告警并跳过——不能靠它兜底。)
|
||||
- id: lv-conf-sync
|
||||
name: 两份 lv_conf.h 特性子集一致性
|
||||
entry: python scripts/check_lv_conf_sync.py
|
||||
entry: scripts/gate_python.py scripts/check_lv_conf_sync.py
|
||||
language: system
|
||||
files: ^(Lib/lv_conf\.h|simulator/lv_conf\.h|scripts/check_lv_conf_sync\.py)$
|
||||
pass_filenames: false
|
||||
@@ -254,7 +254,7 @@ repos:
|
||||
# 范围:仅在这些易失文件变动时触发(改动 .ioc 或生成文件本身就值得复核)。
|
||||
- id: cubemx-survival
|
||||
name: CubeMX 重生成存活审计
|
||||
entry: python scripts/check_cubemx_survival.py --check
|
||||
entry: scripts/gate_python.py scripts/check_cubemx_survival.py --check
|
||||
language: system
|
||||
files: ^(STM32F407-Demo\.ioc|Src/.*\.(c|h)|Inc/.*\.h|App/util/task_watchdog\.(c|h)|MDK-ARM/.*\.uvprojx|scripts/check_cubemx_survival\.py)$
|
||||
pass_filenames: false
|
||||
@@ -267,7 +267,7 @@ repos:
|
||||
# 详见 docs/测试说明/单元测试/看门狗单元测试说明.md
|
||||
- id: watchdog-unit-test
|
||||
name: 看门狗判定状态机单测(主机侧)
|
||||
entry: python test/host/watchdog/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/watchdog/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/util/task_watchdog\.(c|h)|test/host/watchdog/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -281,7 +281,7 @@ repos:
|
||||
# files 含 sys_clock.c 依赖的 sd2506.h(时间结构/返回值定义)。
|
||||
- id: sys-clock-unit-test
|
||||
name: 系统时钟换算单测(主机侧)
|
||||
entry: python test/host/sys_clock/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/sys_clock/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/util/sys_clock\.(c|h)|Drivers/BSP/SD2506/sd2506\.h|test/host/sys_clock/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -297,7 +297,7 @@ repos:
|
||||
# 不落盘,且 net_cfg_save 仍报 OK)。详见测试说明文档。
|
||||
- id: cfg-file-unit-test
|
||||
name: 配置引擎单测(主机侧)
|
||||
entry: python test/host/cfg_file/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/cfg_file/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/cfg/cfg_file\.(c|h)|App/cfg/cfg_file_store\.h|App/log/sys_log\.h|test/host/cfg_file/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -311,7 +311,7 @@ repos:
|
||||
# files 含被测的两个源与其头,以及 harness 本身。
|
||||
- id: phasor-unit-test
|
||||
name: 相量层单测(主机侧)
|
||||
entry: python test/host/phasor/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/phasor/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/algo/(phasor|sample_ring)\.(c|h)|test/host/phasor/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -325,7 +325,7 @@ repos:
|
||||
# files 含被测源与其头、两个桩头所在目录,以及 harness 本身。
|
||||
- id: adc-input-unit-test
|
||||
name: ADC 输入层单测(主机侧)
|
||||
entry: python test/host/adc_input/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/adc_input/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/algo/adc_input\.(c|h)|test/host/adc_input/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -340,7 +340,7 @@ repos:
|
||||
# files 含被测源与其头,以及 harness 本身。
|
||||
- id: vol-lock-unit-test
|
||||
name: 卷锁单测(主机侧)
|
||||
entry: python test/host/vol_lock/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/vol_lock/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/fs/vol_lock\.(c|h)|test/host/vol_lock/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -355,7 +355,7 @@ repos:
|
||||
# 以及 harness 本身。
|
||||
- id: vol-idle-sync-unit-test
|
||||
name: 卷空闲同步单测(主机侧)
|
||||
entry: python test/host/vol_idle_sync/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/vol_idle_sync/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/fs/vol_idle_sync\.(c|h)|App/task/default_task\.c|test/host/vol_idle_sync/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -370,7 +370,7 @@ repos:
|
||||
# files 含被测源与其头、节拍契约头 time_sntp.h、被测的真实看门狗头,以及 harness 本身。
|
||||
- id: time-sync-unit-test
|
||||
name: 时间同步单测(主机侧)
|
||||
entry: python test/host/time_sync/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/time_sync/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/sync/time_sync\.(c|h)|App/sync/time_sntp\.h|App/util/task_watchdog\.h|test/host/time_sync/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -384,7 +384,7 @@ repos:
|
||||
# files 含被测源与其头、adc_task.c(告警编排的消费方),以及 harness 本身。
|
||||
- id: adc-health-unit-test
|
||||
name: ADC 有效性校验单测(主机侧)
|
||||
entry: python test/host/adc_health/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/adc_health/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/algo/adc_health\.(c|h)|App/task/adc_task\.c|test/host/adc_health/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -398,7 +398,7 @@ repos:
|
||||
# 以及 harness 本身。
|
||||
- id: adc-cal-unit-test
|
||||
name: 通道标定层单测(主机侧)
|
||||
entry: python test/host/adc_cal/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/adc_cal/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/algo/adc_cal\.(c|h)|App/algo/adc_health\.(c|h)|App/cfg/cfg_file\.(c|h)|App/task/adc_task\.c|test/host/adc_cal/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -409,7 +409,7 @@ repos:
|
||||
# 或量纲再错位,断言立刻翻转。files 覆盖链上全部生产源与两处编排。
|
||||
- id: prot-dim-unit-test
|
||||
name: 量纲回归单测(主机侧)
|
||||
entry: python test/host/prot_dim/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/prot_dim/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/algo/(adc_cal|prot_elm|prot_set|phasor|sample_ring|freq)\.(c|h)|App/task/(adc_task|protect_task)\.c|test/host/prot_dim/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -424,7 +424,7 @@ repos:
|
||||
# 同链核(phasor/sample_ring)、编排方 adc_task 与 harness 本身。
|
||||
- id: meas-unit-test
|
||||
name: 遥测快照层单测(主机侧)
|
||||
entry: python test/host/meas/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/meas/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/algo/meas\.(c|h)|App/algo/(phasor|sample_ring)\.(c|h)|App/task/adc_task\.c|test/host/meas/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -434,7 +434,7 @@ repos:
|
||||
# 分档量程守卫、两段式、系数直通的合法带与生效值回显必须离线钉死。
|
||||
- id: run-par-unit-test
|
||||
name: 运行参数段单测(主机侧)
|
||||
entry: python test/host/run_par/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/run_par/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/algo/run_par\.(c|h)|App/algo/adc_cal\.(c|h)|App/cfg/cfg_file(_store)?\.(c|h)|test/host/run_par/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -446,7 +446,7 @@ repos:
|
||||
# 任何元件接线之前钉死——板端无法穷举越界定值注入,主机侧毫秒级全跑。
|
||||
- id: prot-set-unit-test
|
||||
name: 保护定值模型单测(主机侧)
|
||||
entry: python test/host/prot_set/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/prot_set/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/algo/prot_set\.(c|h)|test/host/prot_set/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -457,7 +457,7 @@ repos:
|
||||
# 1.2×/0.9× 验收口径(规划 §8)。
|
||||
- id: prot-elm-unit-test
|
||||
name: 保护元件框架单测(主机侧)
|
||||
entry: python test/host/prot_elm/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/prot_elm/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/algo/prot_elm\.(c|h)|App/algo/prot_set\.(c|h)|App/algo/phasor\.(c|h)|App/algo/freq\.(c|h)|test/host/prot_elm/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -468,7 +468,7 @@ repos:
|
||||
# 可穷举的精度契约;板端无标准源照不出来(规划 §3.3 过频 / 低频)。
|
||||
- id: freq-unit-test
|
||||
name: 频率测量单测(主机侧)
|
||||
entry: python test/host/freq/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/freq/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/algo/freq\.(c|h)|App/algo/phasor\.(c|h)|App/algo/sample_ring\.(c|h)|test/host/freq/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -480,7 +480,7 @@ repos:
|
||||
# 在主机侧毫秒级钉死。零平台依赖,无桩。
|
||||
- id: sha256-unit-test
|
||||
name: SHA-256 单测(主机侧)
|
||||
entry: python test/host/sha256/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/sha256/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/util/sha256\.(c|h)|test/host/sha256/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -491,7 +491,7 @@ repos:
|
||||
# 设计(tick 参数注入)就是为了让这些分支主机侧毫秒级穷举。
|
||||
- id: ftp-auth-unit-test
|
||||
name: FTP 鉴权状态机单测(主机侧)
|
||||
entry: python test/host/ftp_auth/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/ftp_auth/run_unit_test.py
|
||||
language: system
|
||||
files: ^(Drivers/BSP/NET/lftpd/lftpd_auth\.(c|h)|App/util/sha256\.(c|h)|test/host/ftp_auth/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -504,7 +504,7 @@ repos:
|
||||
# 直接 #include 这些生产源,签名变了要立刻在这里暴露。
|
||||
- id: iec104-unit-test
|
||||
name: IEC104 协议栈单测(主机侧)
|
||||
entry: python test/host/iec104/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/iec104/run_unit_test.py
|
||||
language: system
|
||||
# 运行参数段落地起本 TU 链入真实 cfg_file/adc_cal/run_par(板端真源链),触发面同步扩
|
||||
files: ^(App/protocol/iec104/iec104_(asdu|pts|link)\.(c|h)|App/algo/(prot_set|prot_elm|phasor|sample_ring|adc_input|freq|meas|adc_cal|run_par)\.(c|h)|App/cfg/cfg_file(_store)?\.(c|h)|test/host/iec104/.*|test/host/common/unit_test_harness\.py)$
|
||||
@@ -517,7 +517,7 @@ repos:
|
||||
# 截断/坏校验/IV 位/seq 连续性(规划 §3.4 出口与记录)。
|
||||
- id: soe-unit-test
|
||||
name: SOE 动作记录编解码单测(主机侧)
|
||||
entry: python test/host/soe/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/soe/run_unit_test.py
|
||||
language: system
|
||||
files: ^(App/log/soe_rec\.(c|h)|App/log/soe_store\.(c|h)|test/host/soe/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -536,7 +536,7 @@ repos:
|
||||
# 触发面含 dhara 本体(测试一并 #include map.c/journal.c 跑真链路场景)。
|
||||
- id: nand-port-unit-test
|
||||
name: dhara NAND 移植层单测(主机侧)
|
||||
entry: python test/host/nand_port/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/nand_port/run_unit_test.py
|
||||
language: system
|
||||
files: ^(Drivers/BSP/GD5F2GQ5UE/nand_ftl\.(c|h)|Drivers/BSP/GD5F2GQ5UE/gd5f2gq5ue\.h|Lib/dhara/(map|journal|nand|error|bytes)\.(c|h)|test/host/nand_port/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -553,7 +553,7 @@ repos:
|
||||
# files 覆盖被测两件 + 编号真源四头 + 页面消费面(ui_content_page/ui_menu*)+ harness。
|
||||
- id: ui-data-unit-test
|
||||
name: UI 数据快照层单测(主机侧)
|
||||
entry: python test/host/ui_data/run_unit_test.py
|
||||
entry: scripts/gate_python.py test/host/ui_data/run_unit_test.py
|
||||
language: system
|
||||
files: ^(Drivers/BSP/UI/(ui_data|ui_w_soe|ui_w_records|ui_content_page|ui_menu)\.(c|h)|App/app/ui_data_feed\.(c|h)|App/algo/(adc_input|prot_set|prot_elm)\.(c|h)|App/log/soe_rec\.(c|h)|test/host/ui_data/.*|test/host/common/unit_test_harness\.py)$
|
||||
pass_filenames: false
|
||||
@@ -567,7 +567,7 @@ repos:
|
||||
# 判据与背景见 docs/门禁说明/test-suite-switch.md
|
||||
- id: test-suite-switch
|
||||
name: 测试套件开关=产品构建
|
||||
entry: python scripts/check_test_suite.py
|
||||
entry: scripts/gate_python.py scripts/check_test_suite.py
|
||||
language: system
|
||||
files: ^test/board/test_config\.h$
|
||||
pass_filenames: false
|
||||
@@ -585,7 +585,7 @@ repos:
|
||||
# 任意 .c + uvprojx + CMakeLists.txt + 脚本自身(脚本自身改动也值得复跑)。
|
||||
- id: registration-check
|
||||
name: 双端注册反向校验 (uvprojx + CMakeLists)
|
||||
entry: python scripts/check_registration.py
|
||||
entry: scripts/gate_python.py scripts/check_registration.py
|
||||
language: system
|
||||
files: (\.c$|\.uvprojx$|CMakeLists\.txt$|^scripts/check_registration\.py$)
|
||||
pass_filenames: false
|
||||
@@ -599,7 +599,7 @@ repos:
|
||||
# 全部自研代码目录 + lv_conf.h + 测试板配置 + 脚本/tsv/台账自身 + 本配置文件。
|
||||
- id: mem-budget
|
||||
name: RAM 预算 92% 阈值门禁
|
||||
entry: python scripts/ram_baseline.py --gate
|
||||
entry: scripts/gate_python.py scripts/ram_baseline.py --gate
|
||||
language: system
|
||||
files: ^(App/|Drivers/BSP/|Src/|Inc/|Lib/lv_conf\.h|test/board/|scripts/ram_baseline\.|docs/内存管理/|\.pre-commit-config\.yaml$)
|
||||
pass_filenames: false
|
||||
@@ -619,7 +619,7 @@ repos:
|
||||
# UI 源码(含字体 .c 自身)+ ui_task.{c,h} + 字符集 txt + 两个生成器 + 本脚本。
|
||||
- id: font-charset
|
||||
name: UI 字符集差集检查(防缺字白框)
|
||||
entry: python scripts/check_font_charset.py
|
||||
entry: scripts/gate_python.py scripts/check_font_charset.py
|
||||
language: system
|
||||
files: ^(Drivers/BSP/UI/|App/task/ui_task\.(c|h)$|ui_cn_chars\.txt$|tools/font_gen/|scripts/check_font_charset\.py$)
|
||||
pass_filenames: false
|
||||
@@ -634,7 +634,7 @@ repos:
|
||||
# 单独改任何一处都会在别人的提交里被拦下——名单散在三处而无人同步等于没有名单。
|
||||
- id: bom-guard
|
||||
name: BOM 漂移检查(带 BOM 文件被剥掉即拦)
|
||||
entry: python scripts/check_bom_drift.py
|
||||
entry: scripts/gate_python.py scripts/check_bom_drift.py
|
||||
language: system
|
||||
files: ^(Drivers/BSP/UI/|App/task/ui_task\.c$|App/cfg/cfg_file\.c$|Lib/lv_conf\.h$)
|
||||
|
||||
@@ -649,7 +649,7 @@ repos:
|
||||
# skip(skip 不是失败),合并后自动生效,不需要任何人再动这条配置。
|
||||
- id: setview-check
|
||||
name: 定值查看行表与 prot_set 枚举/上下限一致性
|
||||
entry: python tools/setview_check/check_setview_limits.py
|
||||
entry: scripts/gate_python.py tools/setview_check/check_setview_limits.py
|
||||
language: system
|
||||
files: ^(tools/setview_check/|Drivers/BSP/UI/ui_w_setview\.(c|h)$)
|
||||
pass_filenames: false
|
||||
@@ -673,7 +673,7 @@ repos:
|
||||
# 连续两次失败才当真(不许直接 --no-verify 绕过)。
|
||||
- id: ui-golden
|
||||
name: UI 像素回归(菜单 8 状态 + 内容页 74 张 黄金参考)
|
||||
entry: python scripts/check_ui_golden.py
|
||||
entry: scripts/gate_python.py scripts/check_ui_golden.py
|
||||
language: system
|
||||
files: ^(Drivers/BSP/UI/|App/task/ui_task\.(c|h)$|simulator/(tests|sim|src)/|simulator/main\.c$|simulator/CMakeLists\.txt$|simulator/lv_conf\.h$|scripts/check_ui_golden\.py$|\.pre-commit-config\.yaml$)
|
||||
pass_filenames: false
|
||||
@@ -693,7 +693,7 @@ repos:
|
||||
# 把每个 UI 提交都拉去跑导航器,只会让人习惯等一个与本改动无关的钩子。
|
||||
- id: uinav-selftest
|
||||
name: 板端 UI 导航器认屏自检(快检:黄金参考帧分类)
|
||||
entry: python scripts/board_ui_nav.py --selftest-quick
|
||||
entry: scripts/gate_python.py scripts/board_ui_nav.py --selftest-quick
|
||||
language: system
|
||||
files: ^(scripts/board_ui_nav\.py$|simulator/tests/ref/.*\.bin$)
|
||||
pass_filenames: false
|
||||
@@ -724,7 +724,7 @@ repos:
|
||||
# 扫描范围恒为全库(要跨文件建 App 头索引),故 pass_filenames: false。
|
||||
- id: layer-deps
|
||||
name: 分层方向(BSP 不得反向 include App)
|
||||
entry: python scripts/check_layer_deps.py
|
||||
entry: scripts/gate_python.py scripts/check_layer_deps.py
|
||||
language: system
|
||||
files: ^Drivers/BSP/|^scripts/check_layer_deps\.py$|^\.pre-commit-config\.yaml$
|
||||
pass_filenames: false
|
||||
@@ -740,7 +740,7 @@ repos:
|
||||
# 恒扫全库(要按 git 清单建公开头索引),故 pass_filenames: false。
|
||||
- id: bsp-err
|
||||
name: BSP 错误码与超时命名约定
|
||||
entry: python scripts/check_bsp_err.py
|
||||
entry: scripts/gate_python.py scripts/check_bsp_err.py
|
||||
language: system
|
||||
files: ^Drivers/BSP/|^scripts/check_bsp_err\.py$|^\.pre-commit-config\.yaml$
|
||||
pass_filenames: false
|
||||
@@ -772,7 +772,7 @@ repos:
|
||||
- id: test-coverage
|
||||
name: 主机单测覆盖率(增量拦截:已覆盖行只增不减)
|
||||
stages: [manual]
|
||||
entry: python scripts/check_test_coverage.py
|
||||
entry: scripts/gate_python.py scripts/check_test_coverage.py
|
||||
language: system
|
||||
files: ^(App/|Drivers/BSP/|test/host/|scripts/check_test_coverage\.py|scripts/test_coverage_baseline\.json|\.pre-commit-config\.yaml$)
|
||||
pass_filenames: false
|
||||
@@ -808,7 +808,7 @@ repos:
|
||||
# 生成物(docs/images/*.svg + 两份注册表)、脚本自身与本配置文件(同 registration-check 口径)。
|
||||
- id: generated-fresh
|
||||
name: 生成器幂等性(重跑到临时目录 → 与工作区逐字节一致)
|
||||
entry: python scripts/check_generated_fresh.py
|
||||
entry: scripts/gate_python.py scripts/check_generated_fresh.py
|
||||
language: system
|
||||
files: ^(tools/.+|Drivers/BSP/UI/.+|docs/images/.*\.svg|App/task/ui_task\.(c|h)|ui_menu_tree\.txt|ui_cn_chars\.txt|MDK-ARM/STM32F407-Demo\.uvprojx|simulator/CMakeLists\.txt|scripts/check_generated_fresh\.py|scripts/check_font_charset\.py|\.pre-commit-config\.yaml)$
|
||||
pass_filenames: false
|
||||
@@ -834,7 +834,7 @@ repos:
|
||||
# 口径与自查命令见 docs/门禁说明/README.md §2 首条。
|
||||
- id: nested-comment
|
||||
name: "块注释体内不得再出现 /*(ARMCC 9-D 嵌套注释)"
|
||||
entry: python scripts/check_nested_comment.py
|
||||
entry: scripts/gate_python.py scripts/check_nested_comment.py
|
||||
language: system
|
||||
types: [c]
|
||||
|
||||
@@ -860,6 +860,6 @@ repos:
|
||||
# 详解与限制 → docs/门禁说明/skill-size.md。
|
||||
- id: skill-size
|
||||
name: "SKILL.md 不超插件写侧上限 65536 且 reference/ 指针不悬空"
|
||||
entry: python scripts/check_skill_size.py
|
||||
entry: scripts/gate_python.py scripts/check_skill_size.py
|
||||
language: system
|
||||
files: ^\.dsh/skills/
|
||||
|
||||
Reference in New Issue
Block a user