Add GitHub actions and LuaCheck (#12)
* Add GitHub actions and LuaCheck * Fix LuaCheck warnings
This commit is contained in:
parent
ebcdaa77fa
commit
11dcb3663b
16
.github/workflows/build.yml
vendored
Normal file
16
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
name: build
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
luacheck:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install Luarocks
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qyy
|
||||||
|
sudo apt-get install luarocks -qyy
|
||||||
|
- name: Install Luacheck
|
||||||
|
run: luarocks install --local luacheck
|
||||||
|
- name: Run Luacheck
|
||||||
|
run: $HOME/.luarocks/bin/luacheck .
|
21
.luacheckrc
Normal file
21
.luacheckrc
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
unused_args = false
|
||||||
|
allow_defined_top = true
|
||||||
|
max_line_length = 999
|
||||||
|
|
||||||
|
globals = {
|
||||||
|
"ctf", "minetest",
|
||||||
|
"irc", "ctf_playertag",
|
||||||
|
"gauges",
|
||||||
|
}
|
||||||
|
|
||||||
|
read_globals = {
|
||||||
|
string = {fields = {"split", "trim"}},
|
||||||
|
table = {fields = {"copy", "getn"}},
|
||||||
|
|
||||||
|
"ctf_stats",
|
||||||
|
"filter",
|
||||||
|
}
|
||||||
|
|
||||||
|
files["server_chat/staff_channel.lua"].read_globals = { "table" }
|
||||||
|
files["spectator_mode/init.lua"].globals = { "ctf_map" }
|
||||||
|
files["spectator_mode/init.lua"].ignore = { "player" }
|
Loading…
x
Reference in New Issue
Block a user