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

This commit is contained in:
cnc
2026-06-05 06:52:42 +08:00
parent fb2b5c4920
commit f64db24060
2 changed files with 24 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ cd "$(dirname "$0")"
# with linuxcnc-kinematics-source-files.txt, which enumerates LinuxCNC
# kinematics, posemath, switchkins INI/HAL/remap/tooldata/assets, and adjacent
# build metadata. It validates source coverage documentation only; it does not
# add or interpret CNC behavior.
# add CNC behavior, expand smoke parsing, or interpret G-code.
linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc}
linuxcnc_root=$(cd "$linuxcnc_root" && pwd)
@@ -64,6 +64,9 @@ for group in expected_groups:
required_phrases = [
"LinuxCNC Source Anchors",
"must not add CNC behavior",
"must not",
"expand the temporary smoke parser",
"`src/emc/kinematics/Submakefile`",
"`src/emc/kinematics/kinematics.h`",
"motion.switchkins-type",
@@ -72,12 +75,23 @@ required_phrases = [
"OPFS-only",
"derive M428/M429/M430 cases from",
"RTCP and five-axis coverage",
"./check-linuxcnc-kinematics-source-map.sh",
"./check-linuxcnc-inputs.sh linuxcnc-kinematics-source-files.txt --require-kinematics-complete",
"./check-linuxcnc-switchkins-remap-table.sh linuxcnc-kinematics-source-files.txt",
"does not interpret G-code",
]
for phrase in required_phrases:
if phrase not in source_map:
raise SystemExit(
f"docs/linuxcnc-kinematics-source-map.md is missing source-coverage 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-kinematics-source-map.sh" not in text:
raise SystemExit(f"{entry} must run ./check-linuxcnc-kinematics-source-map.sh")
PY