From ef9a394cba2a59774e2530850922b16e4af209df Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Wed, 24 May 2023 08:03:06 +0200 Subject: [PATCH] add luacheck and ci workflow --- .github/workflows/luacheck.yml | 17 +++++++++++++++++ .luacheckrc | 22 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/luacheck.yml create mode 100644 .luacheckrc diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml new file mode 100644 index 0000000..1effc90 --- /dev/null +++ b/.github/workflows/luacheck.yml @@ -0,0 +1,17 @@ +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 new file mode 100644 index 0000000..840ef29 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,22 @@ +-- unused_args = false +-- allow_defined_top = true +-- ignore = {"512"} + +globals = { + "digtron" +} + +read_globals = { + -- Stdlib + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + "VoxelManip", + + -- Minetest + "minetest", + "vector", "ItemStack", + "dump", "VoxelArea", + + -- Deps + "default" +}