diff --git a/.github/workflows/latex-lint.yml b/.github/workflows/latex-lint.yml index 91f216b..5882f00 100644 --- a/.github/workflows/latex-lint.yml +++ b/.github/workflows/latex-lint.yml @@ -31,14 +31,22 @@ jobs: echo "No .tex files found in latex/. Skipping lint." exit 0 fi - - echo "Linting .tex files with chktex..." + + echo "🔍 Linting .tex files with chktex..." FAIL=0 + for f in $TEX_FILES; do - chktex -q -n1 "$f" || FAIL=1 + echo "▶ Checking $f" + # Run chktex and show output; capture error status + if ! chktex "$f"; then + echo "::warning file=$f::ChkTeX found issues in $f" + FAIL=1 + fi done - + if [ $FAIL -ne 0 ]; then - echo "::error::Lint errors detected." + echo "::error::❌ Lint errors or warnings were found in one or more .tex files above." exit 1 + else + echo "✅ All files passed chktex lint." fi