Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a global .luacheckrc #27

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/luacheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

name: luacheck
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: Roang-zero1/factorio-mod-luacheck@master
with:
luacheckrc_url: ""
38 changes: 38 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
unused_args = false

globals = {
"homedecor",
"homedecor_lighting",
"homedecor_windows_and_treatments",
"homedecor_roofing",
"homedecor_misc",
"homedecor_exterior",
"homedecor_electrical",
"lavalamp",
"lrfurn",
"signs_lib",

-- mod-deps
"armor"
}

read_globals = {
"minetest", "core",
"vector", "ItemStack",

-- Stdlib
string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn"}},

-- mod-deps
"default",
"unifieddyes",
"player_api",
"screwdriver",
"hopper",
"mesecon",
"skins",
"homedecor_doors_and_gates",
"stairsplus",
"creative"
}
6 changes: 4 additions & 2 deletions homedecor_kitchen/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,10 @@ for _, mat in ipairs(counter_materials) do
end
})

homedecor.kitchen_convert_nodes[#homedecor.kitchen_convert_nodes + 1] = "homedecor:kitchen_cabinet"..material
homedecor.kitchen_convert_nodes[#homedecor.kitchen_convert_nodes + 1] = "homedecor:kitchen_cabinet"..material.."_locked"
homedecor.kitchen_convert_nodes[#homedecor.kitchen_convert_nodes + 1] =
"homedecor:kitchen_cabinet"..material
homedecor.kitchen_convert_nodes[#homedecor.kitchen_convert_nodes + 1] =
"homedecor:kitchen_cabinet"..material.."_locked"

end

Expand Down
6 changes: 3 additions & 3 deletions homedecor_tables/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ local tabletop_materials = {
}
}

leg_materials = {
local leg_materials = {
{ "brass", S("brass") },
{ "wrought_iron", S("wrought iron") },
{ "wood", S("wood") }
Expand Down Expand Up @@ -55,7 +55,7 @@ local tables_cbox = {
}

for i, mat in ipairs(tabletop_materials) do
local m, small_s, small_r, large = unpack(mat)
local m = unpack(mat)
local s

if m == "glass" then
Expand Down Expand Up @@ -101,7 +101,7 @@ for i, mat in ipairs(tabletop_materials) do
})

for _, l in ipairs(leg_materials) do
local leg_mat, desc = unpack(l)
local leg_mat = unpack(l)

homedecor.register(string.format("%s_table_%s_with_%s_legs", m, shape, leg_mat), {
description = string.format("%s %s table with %s legs", shape, m, leg_mat),
Expand Down
2 changes: 1 addition & 1 deletion homedecor_wardrobe/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local S = minetest.get_translator("homedecor_wardrobe")
modpath = minetest.get_modpath("homedecor_wardrobe")
local modpath = minetest.get_modpath("homedecor_wardrobe")

local wd_cbox = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5}}

Expand Down