diff --git a/chatroom_tutorial/.github/workflows/luacheck.yml b/chatroom_tutorial/.github/workflows/luacheck.yml new file mode 100644 index 0000000..295abb0 --- /dev/null +++ b/chatroom_tutorial/.github/workflows/luacheck.yml @@ -0,0 +1,16 @@ +name: luacheck +on: [push, pull_request] + +jobs: + luacheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Luarocks + run: | + sudo apt-get update -qyy + sudo apt-get install luarocks -qyy + - name: Install Luacheck + run: luarocks install --local luacheck + - name: Run Luacheck + run: $HOME/.luarocks/bin/luacheck . diff --git a/chatroom_tutorial/.luacheckrc b/chatroom_tutorial/.luacheckrc new file mode 100644 index 0000000..ec72470 --- /dev/null +++ b/chatroom_tutorial/.luacheckrc @@ -0,0 +1,52 @@ +read_globals = { + "DIR_DELIM", + "INIT", + + "minetest", + "core", + "dump", + "dump2", + + "Raycast", + "Settings", + "PseudoRandom", + "PerlinNoise", + "VoxelManip", + "SecureRandom", + "VoxelArea", + "PerlinNoiseMap", + "PcgRandom", + "ItemStack", + "AreaStore", + + "vector", + + "mhud", + "teacher", + "beerchat", + + table = { + fields = { + "copy", + "indexof", + "insert_all", + "key_value_swap", + "shuffle", + } + }, + + string = { + fields = { + "split", + "trim", + } + }, + + math = { + fields = { + "hypot", + "sign", + "factorial" + } + }, +}