Skip to content

Commit 426af3b

Browse files
committed
ci: add lls-check
1 parent 8c53482 commit 426af3b

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/lls-check/

scripts/lls-check

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
3+
# Performs a lua-language-server check on all files.
4+
# lls-check/check.json will be produced on any issues, returning 1.
5+
6+
rm -rf lls-check
7+
mkdir lls-check
8+
9+
OUT=$(lua-language-server --checklevel=Information --check . --logpath=lls-check --loglevel=error)
10+
echo "${OUT}"
11+
12+
RC=$?
13+
if [ $RC -ne 0 ]; then
14+
echo "failed with RC=$RC"
15+
exit $RC
16+
fi
17+
18+
case "${OUT}" in
19+
*Diagnosis\ completed*)
20+
if [ -f "lls-check/check.json" ]; then
21+
exit 1
22+
else
23+
exit 0
24+
fi
25+
;;
26+
*)
27+
exit 1
28+
;;
29+
esac
30+

0 commit comments

Comments
 (0)