Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jan 2021 06:13:40 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 0b97b9ae187f - stable/12 - lualoader: fix lua-lint run
Message-ID:  <202101240613.10O6DeTm062808@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=0b97b9ae187fe02348b1b4000f964aaa257b1edf

commit 0b97b9ae187fe02348b1b4000f964aaa257b1edf
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2020-12-17 18:29:30 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2021-01-24 06:13:03 +0000

    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.
    
    (cherry picked from commit 29842cb36e74037989b7a7f0bf38a47f342bac91)
---
 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 d1947ca1021d..b7581c985a75 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101240613.10O6DeTm062808>