Update latex-lint.yml

This commit is contained in:
Rifqi D. Panuluh
2025-06-03 15:35:51 +07:00
committed by GitHub
parent fe801b0a1c
commit fd765b113f

View File

@@ -31,14 +31,22 @@ jobs:
echo "No .tex files found in latex/. Skipping lint." echo "No .tex files found in latex/. Skipping lint."
exit 0 exit 0
fi fi
echo "Linting .tex files with chktex..." echo "🔍 Linting .tex files with chktex..."
FAIL=0 FAIL=0
for f in $TEX_FILES; do 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 done
if [ $FAIL -ne 0 ]; then 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 exit 1
else
echo "✅ All files passed chktex lint."
fi fi