refactor: Improve linting error accumulation and link checking
This commit is contained in:
parent
67a0794e69
commit
0f1b3d4506
1 changed files with 6 additions and 12 deletions
|
|
@ -31,21 +31,15 @@ for entry in "${GENOMES[@]}"; do
|
|||
# Lint all .md files except AGENTS.md and core-karpathy reference
|
||||
while IFS= read -r md_file; do
|
||||
|
||||
lint_markdown_file "$md_file" "$GENOME_NAME"
|
||||
file_errors=$?
|
||||
TOTAL_ERRORS=$((TOTAL_ERRORS + file_errors))
|
||||
lint_markdown_file "$md_file" "$GENOME_NAME" && fe=0 || fe=$?
|
||||
check_privacy_consistency "$md_file" && pce=0 || pce=$?
|
||||
check_page_size "$md_file" && pse=0 || pse=$?
|
||||
TOTAL_ERRORS=$((TOTAL_ERRORS + fe + pce + pse))
|
||||
|
||||
check_privacy_consistency "$md_file"
|
||||
TOTAL_ERRORS=$((TOTAL_ERRORS + $?))
|
||||
|
||||
check_page_size "$md_file"
|
||||
TOTAL_ERRORS=$((TOTAL_ERRORS + $?))
|
||||
|
||||
check_knowledge_decay "$md_file"
|
||||
stale=$?
|
||||
check_knowledge_decay "$md_file" && stale=0 || stale=$?
|
||||
TOTAL_STALE=$((TOTAL_STALE + stale))
|
||||
|
||||
check_broken_links "$md_file"
|
||||
check_broken_links "$md_file" || true # warnings only, never contributes to errors
|
||||
|
||||
done < <(find "$genome_dir" -name "*.md" \
|
||||
! -name "AGENTS.md" \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue