Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Oct 2020 14:20:37 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r366314 - head/stand/lua
Message-ID:  <202010011420.091EKb1x043510@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Thu Oct  1 14:20:36 2020
New Revision: 366314
URL: https://svnweb.freebsd.org/changeset/base/366314

Log:
  lualoader: clear up some luacheck warnings
  
  - One (1) unused argument
  - One (1) trailing whitespace
  - Two (2) "non-standard global" (curenv, rewind)
  
  tools/boot/lua-lint.sh is once again happy.

Modified:
  head/stand/lua/cli.lua
  head/stand/lua/core.lua
  head/stand/lua/menu.lua

Modified: head/stand/lua/cli.lua
==============================================================================
--- head/stand/lua/cli.lua	Thu Oct  1 13:29:29 2020	(r366313)
+++ head/stand/lua/cli.lua	Thu Oct  1 14:20:36 2020	(r366314)
@@ -130,7 +130,7 @@ cli['read-conf'] = function(...)
 	config.readConf(assert(core.popFrontTable(argv)))
 end
 
-cli['reload-conf'] = function(...)
+cli['reload-conf'] = function()
 	config.reload()
 end
 

Modified: head/stand/lua/core.lua
==============================================================================
--- head/stand/lua/core.lua	Thu Oct  1 13:29:29 2020	(r366313)
+++ head/stand/lua/core.lua	Thu Oct  1 14:20:36 2020	(r366314)
@@ -319,7 +319,7 @@ function core.bootenvDefaultRewinded()
 	end
 
 	for curenv_idx = 0, bootenv_count - 1 do
-		curenv = loader.getenv("bootenvs_check[" .. curenv_idx .. "]")
+		local curenv = loader.getenv("bootenvs_check[" .. curenv_idx .. "]")
 		if curenv == defname then
 			return defname
 		end

Modified: head/stand/lua/menu.lua
==============================================================================
--- head/stand/lua/menu.lua	Thu Oct  1 13:29:29 2020	(r366313)
+++ head/stand/lua/menu.lua	Thu Oct  1 14:20:36 2020	(r366314)
@@ -232,7 +232,7 @@ menu.welcome = {
 					multi_user = multi_user,
 				}
 			else
-				single_user = alts.single_user 
+				single_user = alts.single_user
 				multi_user = alts.multi_user
 			end
 			boot_entry_1, boot_entry_2 = single_user, multi_user
@@ -352,7 +352,7 @@ menu.welcome = {
 		zpool_checkpoints = {
 			entry_type = core.MENU_ENTRY,
 			name = function()
-				rewind = "No"
+				local rewind = "No"
 				if core.isRewinded() then
 					rewind = "Yes"
 				end



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