docs(gdd): 用语规范批 W2——systems 十九篇词面换代 74 处(收口 21/不得 13/报错 7/若干 8/对拍 3/在飞 1/落文 2/随批 2 等按 A 表与语境义改写)+死链修复 2 处(武器锻造→锻造工坊漏改指路)+锻造工坊文头 v0.7→v0.8 失同步补齐;doc_term_audit 增设随批/台账专项补扫通道(白名单自豁免词的版本历史节外可见性)。秘宝充能 2 处与对照性收口 3 处按豁免保留
This commit is contained in:
1 parent
e0ec255d7c
commit
59fdb15567
18 files changed
+123
-76
No files matched your search
+32
-1
@@ -60,6 +60,37 @@ RETIRED_TERMS = [
|
||||
|
||||
DEFAULT_DIRS = ["design/gdd", "design/registry"]
|
||||
|
||||
# 用语规范 A 表补充词专项补扫:随批/台账 两词本身是上方行级白名单信号(行内出现即归
|
||||
# 留档类),主扫描对它们自豁免;本通道只做版本历史节外的专项报告,供后续触碰批清偿。
|
||||
SUPPLEMENT_TERMS = [
|
||||
("随批", "2026-10-15", "顺带", "用语规范 A 表(doc-conventions 第 4 节)"),
|
||||
("台账", "2026-10-15", "状态记录", "用语规范 A 表(doc-conventions 第 4 节)"),
|
||||
]
|
||||
|
||||
|
||||
def scan_supplement(paths):
|
||||
terms = [(re.compile(t), date, repl, note) for t, date, repl, note in SUPPLEMENT_TERMS]
|
||||
findings = []
|
||||
for p in paths:
|
||||
text = Path(p).read_text(encoding="utf-8").replace("\r\n", "\n")
|
||||
in_version_section = False
|
||||
for lineno, line in enumerate(text.split("\n"), 1):
|
||||
if SECTION_RE.match(line):
|
||||
in_version_section = True
|
||||
hits = [(m.group(0), t) for t in terms for m in [t[0].search(line)] if m]
|
||||
if not hits or in_version_section or COMMENT_RE.match(line):
|
||||
continue
|
||||
findings.append({
|
||||
"term": "、".join(sorted({h[0] for h in hits})),
|
||||
"file": str(p).replace("\\", "/"),
|
||||
"line": lineno,
|
||||
"klass": "疑似现行",
|
||||
"text": line.strip()[:160],
|
||||
"retired": hits[0][1][1],
|
||||
"replacement": hits[0][1][2],
|
||||
})
|
||||
return findings
|
||||
|
||||
# 词级语境豁免:某词退役的只是特定机制语境,另一现行机制合法沿用同一词时,
|
||||
# 命中行含豁免语境信号即不算退役词命中(不进疑似、不进留档计数)。
|
||||
# 充能:挖掘期/战斗段充能退役(2026-09-19),但秘宝主动件「每冒险充能」(同调件
|
||||
@@ -134,7 +165,7 @@ def main():
|
||||
paths += sorted(Path(d).rglob("*.yaml"))
|
||||
paths = [p for p in paths if Path(p).exists()]
|
||||
|
||||
findings = scan(paths)
|
||||
findings = scan(paths) + scan_supplement(paths)
|
||||
suspect = [f for f in findings if f["klass"] == "疑似现行"]
|
||||
kept = [f for f in findings if f["klass"] != "疑似现行"]
|
||||
|
||||
|
||||
Reference in new issue
Block a user