mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2024-12-22 07:20:19 +01:00
Add Continuous Integration and LuaCheck (#71)
All warnings have been fixed as well.
This commit is contained in:
parent
03d424fea7
commit
b769824d24
11
.github/workflows/build.yml
vendored
Normal file
11
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
on: [push, pull_request]
|
||||
name: build
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: lint
|
||||
uses: Roang-zero1/factorio-mod-luacheck@master
|
||||
with:
|
||||
luacheckrc_url: ""
|
13
.luacheckrc
Normal file
13
.luacheckrc
Normal file
@ -0,0 +1,13 @@
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
max_line_length = 999
|
||||
|
||||
globals = {
|
||||
"minetest", "unified_inventory", "core",
|
||||
"player_api", "clothing", "armor", "sfinv",
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
string = {fields = {"split", "trim"}},
|
||||
table = {fields = {"copy", "getn"}},
|
||||
}
|
@ -57,7 +57,7 @@ function skins.get_skin_selection_formspec(player, context, perplayer_formspec)
|
||||
local yspc = 2
|
||||
local skinwidth = 1
|
||||
local skinheight = 2
|
||||
local xscale = 1
|
||||
local xscale = 1 -- luacheck: ignore
|
||||
local btn_y = 8.15
|
||||
local drop_y = 8
|
||||
local btn_width = 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
local skins_dir_list = minetest.get_dir_list(skins.modpath.."/textures")
|
||||
|
||||
for _, fn in pairs(skins_dir_list) do
|
||||
local name, sort_id, assignment, is_preview, playername
|
||||
local name, sort_id, is_preview, playername
|
||||
local nameparts = string.gsub(fn, "[.]", "_"):split("_")
|
||||
|
||||
-- check allowed prefix and file extension
|
||||
|
Loading…
Reference in New Issue
Block a user