add luacheck and github workflow (#13)

此提交包含在:
OgelGames
2020-06-20 22:35:24 +10:00
提交者 GitHub
父節點 2ac0b96b47
當前提交 17994ed8db
共有 2 個檔案被更改,包括 31 行新增0 行删除

13
.github/workflows/build.yml 已供應 一般檔案
查看文件

@@ -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 一般檔案
查看文件

@@ -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",
}