fix(ci): M67 文件行数守门补上 *.py / *.sh —— 脚本不再漏网
file-size job 原先只扫 *.rs/*.md/*.slint/*.yml/*.yaml/*.toml/*.json, packaging/ 下的构建辅助脚本(make_artifacts.py、check_screenshot.py、 linux-smoke-docker.sh)完全没有任何行数保护。 - 在 git ls-files 的 pathspec 末尾加 '*.py' '*.sh',语义不变(>400 行即硬失败) - 保留 LICENSE*/CHANGELOG* 排除;Cargo.lock 等机器生成文件刻意不入列 - 阈值、失败方式(::error + exit 1)均未改动
This commit is contained in:
1 parent
0aac307d92
commit
95e8a5ca42
1 file changed
+3
-1
@@ -63,7 +63,9 @@ jobs:
|
||||
echo "::error file=$f::$f 有 $n 行,超过 $LIMIT 行上限,请按模块拆分"
|
||||
failed=$((failed + 1))
|
||||
fi
|
||||
done < <(git ls-files '*.rs' '*.md' '*.slint' '*.yml' '*.yaml' '*.toml' '*.json')
|
||||
# 覆盖范围含脚本(*.py/*.sh):packaging/ 下的构建辅助脚本同样受 400 行约束;
|
||||
# Cargo.lock 等机器生成文件刻意不在列(否则一生成就超限)
|
||||
done < <(git ls-files '*.rs' '*.md' '*.slint' '*.yml' '*.yaml' '*.toml' '*.json' '*.py' '*.sh')
|
||||
if [ "$failed" -ne 0 ]; then
|
||||
echo "共 $failed 个文件超限"
|
||||
exit 1
|
||||
|
||||
Reference in new issue
Block a user