From e62480ddb4e17824b584d9ac269c980538085e7b Mon Sep 17 00:00:00 2001 From: codex Date: Mon, 11 May 2026 17:39:54 -0300 Subject: [PATCH] ci: publish LOC source file totals --- Jenkinsfile | 5 +++++ scripts/check.sh | 6 ++++-- scripts/loc_hygiene_check.py | 6 ++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f76fcf0..649c642 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -244,6 +244,7 @@ PY tests_passed=0 fi coverage_percent="$(jq -r '.coverage_percent // 0' build/quality-summary.json 2>/dev/null || echo 0)" + source_files_total="$(jq -r '.source_files_total // 0' build/quality-summary.json 2>/dev/null || echo 0)" over_500="$(jq -r '.source_lines_over_500 // 0' build/quality-summary.json 2>/dev/null || echo 0)" cat > build/test-summary.json < int: violations: list[str] = [] over_500 = 0 - for path in iter_source_files(root): + source_files = iter_source_files(root) + + for path in source_files: rel = path.relative_to(root).as_posix() line_count = len(path.read_text(encoding="utf-8", errors="ignore").splitlines()) if line_count > 500: @@ -79,7 +81,7 @@ def main() -> int: if line_count > limit: violations.append(f"{rel}: {line_count} lines (limit {limit})") - summary = {"over_500": over_500, "violations": len(violations)} + summary = {"source_files_total": len(source_files), "over_500": over_500, "violations": len(violations)} if args.summary_json: Path(args.summary_json).write_text(json.dumps(summary, indent=2), encoding="utf-8")