add luacheck and ci workflow

This commit is contained in:
BuckarooBanzay 2023-05-24 08:03:06 +02:00
parent 3f9ca87269
commit ef9a394cba
2 changed files with 39 additions and 0 deletions

17
.github/workflows/luacheck.yml vendored Normal file

@ -0,0 +1,17 @@
name: luacheck
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- 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 ./

22
.luacheckrc Normal file

@ -0,0 +1,22 @@
-- unused_args = false
-- allow_defined_top = true
-- ignore = {"512"}
globals = {
"digtron"
}
read_globals = {
-- Stdlib
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},
"VoxelManip",
-- Minetest
"minetest",
"vector", "ItemStack",
"dump", "VoxelArea",
-- Deps
"default"
}