From 08140d10bcacf113266dd52135a9e98623c7d150 Mon Sep 17 00:00:00 2001 From: David Leal Date: Tue, 10 Jan 2023 09:23:45 -0600 Subject: [PATCH] Add LuaCheck and GitHub workflow (#5) --- .github/workflows/build.yml | 11 +++++++++++ .luacheckrc | 12 ++++++++++++ 2 files changed, 23 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..c893168 --- /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@main + - name: lint + uses: Roang-zero1/factorio-mod-luacheck@master + with: + luacheckrc_url: "" diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..72016a2 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,12 @@ +unused_args = false +allow_defined_top = true +max_line_length = false + +read_globals = { + string = {fields = {"split", "trim"}}, + table = {fields = {"copy", "getn"}}, +} + +globals = { + "minetest", "walls", "default" +}