add luacheck and github workflow (#13)

This commit is contained in:
OgelGames 2020-06-20 22:35:24 +10:00 committed by GitHub
parent 2ac0b96b47
commit 17994ed8db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 0 deletions

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

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

18
.luacheckrc Normal file
View File

@ -0,0 +1,18 @@
unused_args = false
allow_defined_top = true
globals = {
"minetest",
}
read_globals = {
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},
-- Builtin
"vector", "ItemStack",
"dump", "DIR_DELIM", "VoxelArea", "Settings",
-- MTG
"default", "sfinv", "creative",
}