From 92325d69b35aa9900e6ddfd3fd3627c431fbd4ef Mon Sep 17 00:00:00 2001 From: OgelGames Date: Mon, 27 Dec 2021 16:10:47 +1100 Subject: [PATCH] add luacheck workflow --- .github/workflows/luacheck.yml | 13 +++++++++++++ .luacheckrc | 19 +++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/luacheck.yml diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml new file mode 100644 index 0000000..a13efa9 --- /dev/null +++ b/.github/workflows/luacheck.yml @@ -0,0 +1,13 @@ +name: luacheck +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: apt + run: sudo apt-get install -y luarocks + - name: luacheck install + run: luarocks install --local luacheck + - name: luacheck run + run: $HOME/.luarocks/bin/luacheck ./ diff --git a/.luacheckrc b/.luacheckrc index 3443394..0bf2cdd 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,14 +1,17 @@ unused_args = false allow_defined_top = true +max_line_length = 185 -read_globals = { +globals = { "biome_lib", - "DIR_DELIM", - "minetest", "core", - "dump", - "vector", "nodeupdate", - "VoxelManip", "VoxelArea", - "PseudoRandom", "ItemStack", - "default", } +read_globals = { + table = {fields = {"copy"}}, + + "minetest", "ItemStack", + "vector", + + "default", + "moretrees", +}