Defer need-check-nil and clean up stale suppressions

emmylua deserialises an unknown diagnostic code to a catch all that
matches no checker, so every `invisible`, `nil-check` and
`global-element` suppression was silently doing nothing. Renamed to the
emmylua codes. `name-style-check` has no equivalent and is dropped, it
was already disabled under luals.

The `get_tile` suppressions referenced an api typedef bug from 2024
which no longer reproduces.

need-check-nil is deferred rather than disabled on merit: a third of the
407 findings come from MapPosition and BoundingBox being aliased as
`struct|[double, double]`, so every `entity.position.x` reads as
possibly nil. The rest need per site knowledge of runtime invariants.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
bbassie
2026-08-07 15:31:18 +00:00
co-authored by Claude Opus 5
parent b9cfbc9036
commit c233a9ab06
13 changed files with 19 additions and 23 deletions
@@ -27,7 +27,7 @@ function Public.show(container)
local left_panel_style = left_panel.style
left_panel_style.width = 300
--- @diagnostic disable-next-line invisible
--- @diagnostic disable-next-line: access-invisible
for element_name in pairs(ExpElement._elements) do
local header = left_panel.add{ type = "flow" }.add{ type = "label", name = header_name, caption = element_name }
Gui.set_data(header, element_name)
@@ -92,18 +92,18 @@ Gui.on_click(
input_text_box.text = concat{ "ExpElement._elements[\"", element_name, "\"]" }
input_text_box.style.font_color = Color.black
--- @diagnostic disable-next-line invisible
--- @diagnostic disable-next-line: access-invisible
local define = ExpElement._elements[element_name]
local content = dump({
--- @diagnostic disable-next-line invisible
--- @diagnostic disable-next-line: access-invisible
debug = define._debug,
--- @diagnostic disable-next-line invisible
--- @diagnostic disable-next-line: access-invisible
has_handlers = define._has_handlers,
--- @diagnostic disable-next-line invisible
--- @diagnostic disable-next-line: access-invisible
track_elements = define._track_elements,
--- @diagnostic disable-next-line invisible
--- @diagnostic disable-next-line: access-invisible
elements = ExpIter._scopes[element_name],
--- @diagnostic disable-next-line invisible
--- @diagnostic disable-next-line: access-invisible
data = ExpData._scopes[element_name]._raw,
}) or "nil"
right_panel.text = content
@@ -24,7 +24,7 @@ function Public.show(container)
local left_panel_style = left_panel.style
left_panel_style.width = 300
--- @diagnostic disable-next-line invisible
--- @diagnostic disable-next-line: access-invisible
for token_id in pairs(Storage._registered) do
local header = left_panel.add{ type = "flow" }.add{ type = "label", name = header_name, caption = token_id }
Gui.set_data(header, token_id)