Skip to content

Commit

Permalink
Clean luacheck warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisant996 committed Aug 10, 2024
1 parent aa71aba commit f8ec35e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ return {
},
globals = {
"clink",
"console",
"error",
"log",
"os",
Expand Down
8 changes: 3 additions & 5 deletions modules/arghelper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ local function make_one_letter_concat_classifier_func(list, parser)
return func
end

local function make_one_letter_concat_onalias_func(list, parser)
local function make_one_letter_concat_onalias_func(parser)
if not parser or parser.has_one_letter_concat_onalias_func then
return
end
Expand All @@ -354,14 +354,12 @@ local function make_one_letter_concat_onalias_func(list, parser)
parser.one_letter_flags = {}
end

local function func(arg_index, word, word_index, line_state)
local function func(arg_index, word, word_index, line_state) -- luacheck: no unused
if arg_index == 0 then
if #word > 2 and word:sub(2, 2) ~= "-" then
local split_pos = 0
local arginfo
local i = 2
local len = #word
local info = line_state:getwordinfo(word_index)
local one_letter_flags = parser.one_letter_flags
while i <= len do
local letter = word:sub(i, i)
Expand Down Expand Up @@ -675,7 +673,7 @@ if not tmp._addexflags or not tmp._addexarg then
end
if concat_flags and parser.setclassifier then
parser:setclassifier(make_one_letter_concat_classifier_func(concat_flags, parser))
parser:addflags({ onalias=make_one_letter_concat_onalias_func(concat_flags, parser) })
parser:addflags({ onalias=make_one_letter_concat_onalias_func(parser) })
end
return parser
end
Expand Down

0 comments on commit f8ec35e

Please sign in to comment.