From 8496ddc071251a2f3227609dde4df2a6c1887ded Mon Sep 17 00:00:00 2001 From: dutchie031 Date: Thu, 10 Sep 2026 20:43:42 +0200 Subject: [PATCH] wip --- .gitea/workflows/pr.yml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml index 0018e63..93cfa58 100644 --- a/.gitea/workflows/pr.yml +++ b/.gitea/workflows/pr.yml @@ -105,13 +105,6 @@ jobs: return now, base, side EOF - cat > ./src/_luals_smoke_test.lua << 'EOF' - local now = timer.getTime() - local base = Airbase.getByName("TEST") - local side = coalition.side.RED - return now, base, side - EOF - set -o pipefail echo "=== smoke(root) ===" @@ -121,19 +114,16 @@ jobs: exit 1 fi - echo "=== smoke(src) ===" - ./luals/bin/lua-language-server --check ./src/_luals_smoke_test.lua --checklevel=Warning --configpath ./.luarc.json 2>&1 | tee ./_luals_smoke_src.log - if grep -q "undefined-global" ./_luals_smoke_src.log; then - echo "Src smoke test reported undefined-global" - exit 1 - fi - - echo "=== check(failing-file) ===" - ./luals/bin/lua-language-server --check ./src/classes/capClasses/CapAirbase.lua --checklevel=Warning --configpath ./.luarc.json 2>&1 | tee ./_luals_capairbase.log || true - grep -n "undefined-global" ./_luals_capairbase.log || true + rm -f ./_luals_smoke_test.lua - name: Run Lua Language Server - run: ./luals/bin/lua-language-server --check ./src --checklevel=Warning --configpath ./.luarc.json + run: | + set -euo pipefail + echo "Checking Lua files one-by-one to keep addon globals resolution consistent" + while IFS= read -r -d '' file; do + echo "Checking $file" + ./luals/bin/lua-language-server --check "$file" --checklevel=Warning --configpath ./.luarc.json + done < <(find ./src -type f -name '*.lua' -print0)