ci: add lls-check

This commit is contained in:
Alexander Courtis
2023-11-21 16:33:52 +11:00
parent 27e66c2ea8
commit 0d6b860e49
2 changed files with 31 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/lls-check/

30
scripts/lls-check Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
# Performs a lua-language-server check on all files.
# lls-check/check.json will be produced on any issues, returning 1.
rm -rf lls-check
mkdir lls-check
OUT=$(lua-language-server --checklevel=Information --check . --logpath=lls-check --loglevel=error)
echo "${OUT}"
RC=$?
if [ $RC -ne 0 ]; then
echo "failed with RC=$RC"
exit $RC
fi
case "${OUT}" in
*Diagnosis\ completed*)
if [ -f "lls-check/check.json" ]; then
exit 1
else
exit 0
fi
;;
*)
exit 1
;;
esac