From 18c087500a04696933cef6a32aee5dbbcb21dd7d Mon Sep 17 00:00:00 2001 From: Wanderingss <1624155937@qq.com> Date: Wed, 11 Nov 2026 12:15:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(gates):=20doc-links=20=E5=85=A8=E5=BA=93?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E6=8E=92=E9=99=A4=20.agents=20=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E5=B7=A5=E4=BD=9C=E6=A0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 主树根跑 --all 时 rglob 会把仓内 .agents/worktrees/* 的整份仓库 副本一并索引,裸文件名解析出 3~4 份导致章节引用假红(本次合并 后复核实测 2 处失效引用 + 4 处芯片手册命名问题)。SKIP_PARTS 已排除同类 .dsh-worktrees,补上 .agents 一项即对齐。 只改 scripts/check_doc_links.py 一行;不改 pre-commit 的 exclude (该处只喂 git tracked 文件,.agents 已被 .gitignore 挡住)。 修后 --all-files 48 钩子全绿、doc-links --all --sections-strict 全库 214 篇文档 rc=0。 --- scripts/check_doc_links.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/check_doc_links.py b/scripts/check_doc_links.py index fdc06a88..8977f4ea 100644 --- a/scripts/check_doc_links.py +++ b/scripts/check_doc_links.py @@ -53,6 +53,7 @@ SKIP_PARTS = ("node_modules", ".venv", ".git", "build", "obj", "__pycache__", "ci-artifacts", # 本地临时/草稿目录,已 .gitignore,不是项目文档 ".dsh-worktrees", # DSH worktree 插件在**仓库内**建的任务树(整份仓库的副本, # 扫它等于把同一篇文档按别人的任务状态判一遍——假红 + 白跑) + ".agents", # 同上:DSH 会话插件的工作树落在 .agents/worktrees/,也是整份仓库副本 "docs/芯片手册") # 外部数据手册转录,非项目自有文档,链接形态不受控 # Markdown 链接:[text](target)。目标须以「非空白、非右括号」构成,