From df220bef355a9923a8860d1b9fe6004775fc034a Mon Sep 17 00:00:00 2001 From: Panquesito7 Date: Mon, 25 May 2020 13:21:47 -0500 Subject: [PATCH] Add GitHub workflow and LuaCheck --- .github/workflows/build.yml | 11 +++++++++++ .luacheckrc | 19 +++++++++++++++++++ 2 files changed, 30 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..980d40a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,11 @@ +on: [push, pull_request] +name: build +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: lint + uses: Roang-zero1/factorio-mod-luacheck@master + with: + luacheckrc_url: https://raw.githubusercontent.com/minetest-mods/item_drop/master/.luacheckrc diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..a9c034e --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,19 @@ +unused_args = false +allow_defined_top = true +max_line_length = 999 + +ignore = { + "name", "drops", "i", +} + +globals = { + "minetest", +} + +read_globals = { + string = {fields = {"split", "trim"}}, + table = {fields = {"copy", "getn"}}, + + "vector", "ItemStack", + "dump", +}