add .luacheckrc and github workflow

This commit is contained in:
BuckarooBanzay 2020-02-13 13:11:50 +01:00 committed by LNJ
parent 0fc267da84
commit fa8095c6a9
2 changed files with 44 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@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 ./

27
.luacheckrc Normal file

@ -0,0 +1,27 @@
unused = false
max_line_length = 240
globals = {
"drawers"
}
read_globals = {
-- Stdlib
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},
-- Minetest
"vector", "ItemStack",
"dump", "VoxelArea",
-- deps
"minetest",
"core",
"default",
"mcl_core",
"mcl_sounds",
"pipeworks",
"screwdriver",
"intllib"
}