参考所有分组,完成尽量多的内容:收紧tooldata source-map边界守卫

This commit is contained in:
cnc
2026-06-05 07:10:30 +08:00
parent 29197b25cc
commit b170ccd95a
2 changed files with 17 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ cd "$(dirname "$0")"
# LinuxCNC source basis: this guard ties LinuxCNC tooldata/Submakefile,
# src/emc/tooldata sources, native/WASM manifests, and wasm-safe tooldata shims
# to the tooldata source map. It validates source coverage only; it does not
# add CNC behavior or expand smoke parsing.
# add CNC behavior, expand smoke parsing, or interpret G-code.
linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc}
linuxcnc_root=$(cd "$linuxcnc_root" && pwd)
@@ -179,7 +179,17 @@ for phrase in [
"WASM-safe tooldata shims must preserve the LinuxCNC export surface",
"inactive-DB return values",
"./check-linuxcnc-tooldata-source-map.sh",
"does not interpret G-code",
]:
if phrase not in doc:
raise SystemExit(f"docs/linuxcnc-tooldata-source-map.md missing boundary phrase: {phrase}")
for entry in [
"test-native.sh",
"test-linuxcnc-source-link.sh",
"build-wasm.sh",
]:
text = Path(entry).read_text(encoding="utf-8")
if "./check-linuxcnc-tooldata-source-map.sh" not in text:
raise SystemExit(f"{entry} must run ./check-linuxcnc-tooldata-source-map.sh")
PY