Skip to content

Commit

Permalink
Add LuaCheck GitHub workflow (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
Panquesito7 authored Jun 4, 2024
1 parent d6545e6 commit f618868
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/luacheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: luacheck
on: [push, pull_request]
jobs:
luacheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: LuaCheck
uses: lunarmodules/luacheck@master
9 changes: 5 additions & 4 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ unused_args = false

globals = {
"snow", "winterize",

"minetest", "throwable_snow", "default", "ctf_teams", "hud_events",
"minetest", "throwable_snow", "default",
"ctf_teams", "hud_events", "skybox"
}

read_globals = {
string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn"}},
table = {fields = {"copy", "getn", "shuffle"}},

"dump", "DIR_DELIM",
"sfinv", "creative",
Expand All @@ -21,7 +21,8 @@ read_globals = {
"VoxelArea",
"VoxelManip",
"PseudoRandom",

"ctf_map",
"ctf_api",

-- Testing
"describe",
Expand Down
3 changes: 2 additions & 1 deletion santa_hat_event/init.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if os.date("%m") ~= "12" or tonumber(os.date("%d")) < 11 or tonumber(os.date("%d")) > 25 or not minetest.get_modpath("server_cosmetics") then return end
if os.date("%m") ~= "12" or tonumber(os.date("%d")) < 11 or tonumber(os.date("%d")) > 2
or not minetest.get_modpath("server_cosmetics") then return end

local META_KEY = "server_cosmetics:snowballs:"..os.date("%Y")
local COSMETIC_KEY = "server_cosmetics:entity:santa_hat:"..os.date("%Y")
Expand Down

0 comments on commit f618868

Please sign in to comment.