add luacheck, add github action for luacheck, fix luacheck warnings, remove depreciated files

master
unknown 2022-08-21 21:22:15 -04:00
parent 052cbb98d0
commit f49bc09de2
6 changed files with 49 additions and 8 deletions

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

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

24
.luacheckrc Normal file
View File

@ -0,0 +1,24 @@
unused_args = false
allow_defined_top = true
exclude_files = {".luacheckrc"}
globals = {
"minetest", "core",
--mod provided
}
read_globals = {
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},
--luac
"math", "table",
-- Builtin
"vector", "ItemStack", "dump", "DIR_DELIM", "VoxelArea", "Settings", "PcgRandom", "VoxelManip", "PseudoRandom",
--mod produced
"default",
}

View File

@ -1,2 +0,0 @@
default
dye

View File

@ -1 +0,0 @@
Adds faintly glowing coloured glass panes which can be used for stained glass windows or for gentle lighting.

View File

@ -1,5 +1,5 @@
function register_pane(name, def)
local function register_pane(name, def)
for i = 1, 15 do
minetest.register_alias("xpanes:" .. name .. "_" .. i, "xpanes:" .. name .. "_flat")
end
@ -66,9 +66,9 @@ end
local panes_list = {
{"white", "White", "ffffff", }, {"blue", "Blue", "0000FF", },
{"cyan", "Cyan", "00FFFF", }, {"green", "Green", "00FF00", },
{"magenta", "Magenta", "FF00FF", }, {"orange", "Orange", "FF6103", },
{"violet", "Purple", "800080", }, {"red", "Red", "FF0000", },
{"cyan", "Cyan", "00FFFF", }, {"green", "Green", "00FF00", },
{"magenta", "Magenta", "FF00FF", }, {"orange", "Orange", "FF6103", },
{"violet", "Purple", "800080", }, {"red", "Red", "FF0000", },
{"yellow", "Yellow", "FFFF00", },
}

View File

@ -1 +1,3 @@
name = abripanes
name = abripanes
depends = default, dye
description = Adds faintly glowing coloured glass panes which can be used for stained glass windows or for gentle lighting.