From 29842cb36e74037989b7a7f0bf38a47f342bac91 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Thu, 17 Dec 2020 18:29:30 +0000 Subject: [PATCH] lualoader: fix lua-lint run luacheck rightfully complains that i is unused in the show-module-options loop at the end (it was used for some debugging in the process). We've added a new pager module that's compiled in, so declare that as an acceptable global. --- stand/lua/cli.lua | 2 +- tools/boot/lua-lint.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/stand/lua/cli.lua b/stand/lua/cli.lua index 9ed26af4b700..cfdc69a520a0 100644 --- a/stand/lua/cli.lua +++ b/stand/lua/cli.lua @@ -234,7 +234,7 @@ cli["show-module-options"] = function() end pager.open() - for i, v in ipairs(lines) do + for _, v in ipairs(lines) do pager.output(v .. "\n") end pager.close() diff --git a/tools/boot/lua-lint.sh b/tools/boot/lua-lint.sh index cc7a007947f2..c6bc89da3330 100755 --- a/tools/boot/lua-lint.sh +++ b/tools/boot/lua-lint.sh @@ -17,4 +17,5 @@ LUACHECK=$(which luacheck) cd $(make -V SRCTOP)/stand ${LUACHECK} . --globals loader --globals lfs --globals io.getchar \ --globals io.ischar --globals printc --globals cli_execute \ - --globals cli_execute_unparsed --globals try_include --std lua53 + --globals cli_execute_unparsed --globals try_include \ + --globals pager --std lua53