The central pipeline lints where the old inline one did not, and it aborts on any warning. Nothing here was actually wrong: 166 of the 243 warnings were the TIC-80 API and the game's own globals being undeclared, which is what .luacheckrc is for — the same shape impostor already uses. The rest was trailing whitespace on 14 lines, now stripped. INPUT_KEY_X is unused but kept: it belongs to the LEFT/RIGHT/A/B/X/Y set and removing it would leave a gap in the mapping, so luacheck is told to allow the family. Verified locally by merging the sources the way the pipeline does and running luacheck over the result: 0 warnings, 0 errors. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
31 lines
627 B
Lua
31 lines
627 B
Lua
-- .luacheckrc
|
|
-- Configuration for luacheck
|
|
--
|
|
-- The CI lint step aborts on any warning, so both the project's own globals
|
|
-- and the TIC-80 API functions this game calls have to be declared here.
|
|
|
|
globals = {
|
|
-- the game's own globals
|
|
"Context",
|
|
"init_game",
|
|
|
|
-- TIC-80 callbacks and API
|
|
"TIC",
|
|
"btn",
|
|
"btnp",
|
|
"cls",
|
|
"exit",
|
|
"keyp",
|
|
"mget",
|
|
"mset",
|
|
"rect",
|
|
"rectb",
|
|
"spr",
|
|
}
|
|
|
|
-- The INPUT_KEY_* constants are a coherent set (LEFT/RIGHT/A/B/X/Y); some are
|
|
-- not bound yet, and dropping them would leave gaps in the mapping.
|
|
ignore = { "211/INPUT_KEY_.*" }
|
|
|
|
std = "lua51" -- TIC-80 runs Lua 5.1
|