From fa8095c6a9c9d3bdf0d3bf517f0ae9d0ed241c91 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Thu, 13 Feb 2020 13:11:50 +0100 Subject: [PATCH] add .luacheckrc and github workflow --- .github/workflows/luacheck.yml | 17 +++++++++++++++++ .luacheckrc | 27 +++++++++++++++++++++++++++ 2 files changed, 44 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..d00f53a --- /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@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..4b9429d --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,27 @@ + +unused = false +max_line_length = 240 + +globals = { + "drawers" +} + +read_globals = { + -- Stdlib + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Minetest + "vector", "ItemStack", + "dump", "VoxelArea", + + -- deps + "minetest", + "core", + "default", + "mcl_core", + "mcl_sounds", + "pipeworks", + "screwdriver", + "intllib" +}