Skip to content

Commit

Permalink
Clean luacheck warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisant996 committed Nov 15, 2023
1 parent d10a4a8 commit f7f9096
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cmd_commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ local function sort__is_slashplus(arg_index, word, word_index, line_state)
end

local sort__slashplus_parser = clink.argmatcher():addarg({fromhistory=true})
local function slashplus_link(link, arg_index, word, word_index, line_state)
local function slashplus_link(_, arg_index, word, word_index, line_state)
if sort__is_slashplus(arg_index, word, word_index, line_state) then
return sort__slashplus_parser
end
Expand Down Expand Up @@ -644,12 +644,13 @@ local function sort__delayinit(argmatcher)
local dirs = clink.argmatcher():addarg(clink.dirmatches)
local files = clink.argmatcher():addarg(clink.filematches)

local desc_slpl = descriptions["/+"]
local flags_list = {
nosort=true,
onlink=slashplus_link,
slashplus_quirks,
"/?",
{ match="/+", arginfo=descriptions["/+"][1], description=descriptions["/+"][2], type="flag", suppressappend=true },
{ match="/+", arginfo=desc_slpl[1], description=desc_slpl[2], type="flag", suppressappend=true },
"/l"..locales_parser, "/locale"..locales_parser,
"/L"..locales_parser, "/LOCALE"..locales_parser,
"/m"..memory_parser, "/memory"..memory_parser,
Expand Down
2 changes: 1 addition & 1 deletion completions/delta.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ local function delayinit(argmatcher)
local section = 'text'
for line in f:lines() do
-- delta has no way to suppress escape codes in --help output?
line = console.plaintext(line)
line = console.plaintext(line) -- luacheck: no global

local short, long = line:match('^ (%-.), (%-%-%g+)')
if not short then
Expand Down

0 comments on commit f7f9096

Please sign in to comment.