diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2aa3597..9c5d2f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,3 +40,22 @@ jobs: - name: Run Tests run: ./tests.sh run + LuaCheck: + runs-on: ubuntu-latest + sets: + # Checkout the git repo + - name: Checkout + uses: actions/checkout@v2 + + - name: Install apt dependencies + run: sudo apt-get --quiet install lua5.1 lua-check + + - name: uname -a + run: uname -a + + - name: Lua version + run: lua -v + + - name: Run luacheck + run: luacheck --config .tests/luacheckrc . || true + diff --git a/.tests/luacheckrc b/.tests/luacheckrc new file mode 100644 index 0000000..36f9fd9 --- /dev/null +++ b/.tests/luacheckrc @@ -0,0 +1,29 @@ +quiet = 1 +codes = true + +exclude_files = { + ".luarocks/*" +} + + +ignore = {"631", "61[124]", "412", "21[123]"} + +-- Read-write globals (i.e. they can be defined) +globals = { + "worldedit", + "worldeditadditions", + "worldeditadditions_commands", + "worldeditadditions_core" +} +-- Read-only globals +read_globals = { + "minetest", + "vector", + "assert", + "bit", + "it", + "describe", + "bonemeal", + "dofile" +} +std = "max"