From 932e12410a098923b8e7009d00e71343830d4bc2 Mon Sep 17 00:00:00 2001 From: wsor Date: Sat, 5 Dec 2020 14:20:51 -0500 Subject: [PATCH] add luacheck --- .github/workflows/build.yml | 17 +++++++++++++++++ .luacheckrc | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .luacheckrc diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..7acb366 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,17 @@ +name: build + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - 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..6bec803 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,21 @@ +unused_args = false +allow_defined_top = true +exclude_files = {".luacheckrc"} + +globals = { + "minetest", +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", "carts", + + --depends +} \ No newline at end of file