Add Continuous Integration and LuaCheck (#2)
Some checks failed
build / lint (push) Has been cancelled

All warnings have been fixed as well. You can verify all is fine by checking the workflow run.
This commit is contained in:
David Leal 2023-06-18 00:20:46 -06:00 committed by GitHub
parent 011d1a890e
commit 8d85362b5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 1 deletions

11
.github/workflows/build.yml vendored Normal file
View File

@ -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: ""

12
.luacheckrc Normal file
View File

@ -0,0 +1,12 @@
unused_args = false
allow_defined_top = true
max_line_length = 999
globals = {
"minetest", "ts_workshop",
}
read_globals = {
string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn"}},
}

View File

@ -84,8 +84,8 @@ function ts_workshop.register_workshop(mod, name, def)
local timer = minetest.get_node_timer(pos)
timer:start(0.2)
else
meta:set_int("progress", 0)
progress = 0
meta:set_int("progress", progress)
local inv = meta:get_inventory()
inv:add_item("output", working_on)
meta:set_string("working_on", "")