参考所有分组,完成尽量多的内容:收紧 manifest 坏行校验

结论:通用 LinuxCNC manifest lister 现在与输入校验一致拒绝缺少 note 或字段数量异常的坏行,并在 all-native guardrail 中覆盖通用 lister 与 native/source-link 调用链;未扩展 smoke 功能。
This commit is contained in:
cnc
2026-06-03 17:37:58 +08:00
parent 1f4044efe2
commit dcf246c0a0
2 changed files with 41 additions and 2 deletions

View File

@@ -44,13 +44,20 @@ case "$output_mode" in
esac
seen_sources=()
while IFS=: read -r group path note; do
case "$group" in
manifest_line_number=0
while IFS= read -r manifest_line || [[ -n "$manifest_line" ]]; do
manifest_line_number=$((manifest_line_number + 1))
case "$manifest_line" in
""|\#*)
continue
;;
esac
IFS=: read -r group path note extra <<<"$manifest_line"
if [[ -z "$group" || -z "$path" || -z "$note" || -n "${extra:-}" ]]; then
echo "bad manifest line $manifest_line_number: $manifest_line" >&2
exit 1
fi
if ! contains_group "$allowed_groups" "$group"; then
echo "unknown manifest group: $group" >&2
exit 1