ci: add luals libs and tidy

This commit is contained in:
Alexander Courtis
2023-11-26 13:22:30 +11:00
parent eb856a50ca
commit 931efb3708
3 changed files with 10 additions and 5 deletions

2
.gitignore vendored
View File

@@ -1 +1 @@
/lls-out/ /luals-out/

View File

@@ -1,6 +1,12 @@
{ {
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"runtime.version" : "Lua 5.1", "runtime.version" : "Lua 5.1",
"workspace": {
"library": [
"$VIMRUNTIME",
"${3rd}/luv/library"
]
},
"diagnostics": { "diagnostics": {
"globals": [ "globals": [
"vim" "vim"

View File

@@ -1,13 +1,13 @@
#!/bin/sh #!/bin/sh
# Performs a lua-language-server check on all files. # Performs a lua-language-server check on all files.
# lls-check/check.json will be produced on any issues, returning 1. # luals-out/check.json will be produced on any issues, returning 1.
# Outputs check.json to stdout, all messages to stderr, to allow jq etc. # Outputs only check.json to stdout, all other messages to stderr, to allow jq etc.
VER_LLS="3.7.3" VER_LLS="3.7.3"
DIR_SRC="${PWD}" DIR_SRC="${PWD}"
DIR_OUT="${DIR_SRC}/lls-out" DIR_OUT="${DIR_SRC}/luals-out"
DIR_LLS="/tmp/lls" DIR_LLS="/tmp/lls"
# clear output # clear output
@@ -21,7 +21,6 @@ if [ ! -d "${DIR_LLS}" ]; then
fi fi
# execute from within the lua-language-server directory as it expects specific file locations # execute from within the lua-language-server directory as it expects specific file locations
cd "${DIR_LLS}" || exit
OUT=$("${DIR_LLS}/bin/lua-language-server" --checklevel=Information --check "${DIR_SRC}" --logpath="${DIR_OUT}" --loglevel=error) OUT=$("${DIR_LLS}/bin/lua-language-server" --checklevel=Information --check "${DIR_SRC}" --logpath="${DIR_OUT}" --loglevel=error)
RC=$? RC=$?