automate luacheck

This commit is contained in:
flux 2022-05-07 17:26:22 -07:00 committed by SmallJoker
parent b97c7caa07
commit 6c6f4d7ff7
2 changed files with 43 additions and 0 deletions

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

@ -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 ./

26
.luacheckrc Normal file
View File

@ -0,0 +1,26 @@
std = "luajit+minetest"
unused_args = false
stds.minetest = {
read_globals = {
"DIR_DELIM",
"minetest",
"dump",
"vector",
"nodeupdate",
"VoxelManip",
"VoxelArea",
"PseudoRandom",
"ItemStack",
"default",
table = {
fields = {
"copy",
},
},
}
}
globals = {
"castle_gates",
}