unused vararg suppression, re-enable unused args luacheck

This commit is contained in:
Mikayla Fischler 2023-05-05 13:09:53 -04:00
parent 0778a442b1
commit 464451c378
2 changed files with 3 additions and 1 deletions

View File

@ -29,4 +29,4 @@ jobs:
# --no-max-line-length = Disable warnings for long line lengths
# --exclude-files ... = Exclude lockbox library (external) and config files
# --globals ... = Override all globals overridden in .vscode/settings.json AND 'os' since CraftOS 'os' differs from Lua's 'os'
args: . --no-max-line-length -a -i 121 512 542 --exclude-files ./lockbox/* ./*/config.lua --globals os _HOST bit colors fs http parallel periphemu peripheral read rs settings shell term textutils window
args: . --no-max-line-length -i 121 512 542 --exclude-files ./lockbox/* ./*/config.lua --globals os _HOST bit colors fs http parallel periphemu peripheral read rs settings shell term textutils window

View File

@ -117,6 +117,7 @@ function util.strwrap(str, limit) return cc_strings.wrap(str, limit) end
---@nodiscard
---@vararg any
---@return string
---@diagnostic disable-next-line: unused-vararg
function util.concat(...)
local str = ""
for _, v in ipairs(arg) do str = str .. util.strval(v) end
@ -130,6 +131,7 @@ util.c = util.concat
---@nodiscard
---@param format string
---@vararg any
---@diagnostic disable-next-line: unused-vararg
function util.sprintf(format, ...)
return string.format(format, table.unpack(arg))
end