add .luacheckrc and github workflow

This commit is contained in:
BuckarooBanzay 2021-12-06 19:28:17 +01:00
parent 823db77217
commit f876cfd597
2 changed files with 36 additions and 0 deletions

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

@ -0,0 +1,13 @@
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 ./

23
.luacheckrc Normal file
View File

@ -0,0 +1,23 @@
unused_args = false
max_line_length= 240
redefined = false
globals = {
"biome_lib"
}
read_globals = {
-- Stdlib
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},
-- Minetest
"vector", "ItemStack",
"dump", "minetest",
"VoxelManip", "VoxelArea",
"PerlinNoise",
-- mods
"default", "intllib"
}