luacheck fixes

This commit is contained in:
Mikayla Fischler 2023-05-05 14:02:25 -04:00
parent 8064b33a36
commit b2e21cb6d9
7 changed files with 12 additions and 12 deletions

View File

@ -18,7 +18,7 @@ local iocontrol = {}
---@class ioctl
local io = {}
-- luacheck push ignore
-- luacheck push ignore success
-- placeholder acknowledge function for type hinting
---@param success boolean

File diff suppressed because one or more lines are too long

View File

@ -113,7 +113,7 @@ end
---@return table lines
function util.strwrap(str, limit) return cc_strings.wrap(str, limit) end
-- luacheck push no unused varargs
-- luacheck push no unused args
-- concatenation with built-in to string
---@nodiscard

View File

@ -120,9 +120,7 @@ function redstone.new(session_id, unit_id, advert, out_queue)
local io_f = {
---@nodiscard
read = function () return rsio.digital_is_active(port, self.phy_io.digital_in[port].phy) end,
---@param active boolean
---@diagnostic disable-next-line: unused-local
write = function (active) end
write = function () end
}
self.db.io[port] = io_f
@ -155,9 +153,7 @@ function redstone.new(session_id, unit_id, advert, out_queue)
---@nodiscard
---@return integer
read = function () return self.phy_io.analog_in[port].phy end,
---@param value integer
---@diagnostic disable-next-line: unused-local
write = function (value) end
write = function () end
}
self.db.io[port] = io_f

View File

@ -166,6 +166,8 @@ function unit_session.new(session_id, unit_id, advert, out_queue, log_tag, txn_t
-- PUBLIC TEMPLATE FUNCTIONS --
-- luacheck push no unused args
-- handle a packet
---@param m_pkt modbus_frame
---@diagnostic disable-next-line: unused-local
@ -180,6 +182,8 @@ function unit_session.new(session_id, unit_id, advert, out_queue, log_tag, txn_t
log.debug("template unit_session.update() called", true)
end
-- luacheck pop
-- invalidate build cache
function public.invalidate_cache()
log.debug("template unit_session.invalidate_cache() called", true)

View File

@ -14,7 +14,7 @@ local supervisor = require("supervisor.supervisor")
local svsessions = require("supervisor.session.svsessions")
local SUPERVISOR_VERSION = "v0.15.5"
local SUPERVISOR_VERSION = "v0.15.6"
local println = util.println
local println_ts = util.println_ts

View File

@ -15,7 +15,7 @@ local println = util.println
-- supervisory controller communications
---@nodiscard
---@param version string supervisor version
---@param _version string supervisor version
---@param num_reactors integer number of reactors
---@param cooling_conf table cooling configuration table
---@param modem table modem device
@ -23,7 +23,7 @@ local println = util.println
---@param svctl_listen integer listening port for supervisor access
---@param range integer trusted device connection range
---@diagnostic disable-next-line: unused-local
function supervisor.comms(version, num_reactors, cooling_conf, modem, dev_listen, svctl_listen, range)
function supervisor.comms(_version, num_reactors, cooling_conf, modem, dev_listen, svctl_listen, range)
local self = {
last_est_acks = {}
}