cc-libs/.luacheckrc
2026-05-31 00:39:18 +02:00

62 lines
1.4 KiB
Lua

-- Luacheck config for CC:Tweaked (ComputerCraft) Lua sandbox.
-- Runtime is Lua 5.1 inside the CC sandbox, not standard Lua, so we
-- extend lua51 with the globals and os/table extensions CC provides.
stds.cc = {
read_globals = {
-- ComputerCraft APIs injected as globals by the sandbox.
"fs",
"peripheral",
"parallel",
"shell",
"term",
"textutils",
"colors",
"colours",
"rednet",
"gps",
"http",
"settings",
"window",
"paintutils",
"keys",
"vector",
"commands",
"disk",
"periphemu", -- CraftOS-PC emulator only
"read",
"sleep",
"write",
-- CC extends the standard os/table tables with extra fields.
os = {
fields = {
"getComputerID", "getComputerLabel", "setComputerLabel",
"queueEvent", "pullEvent", "pullEventRaw",
"startTimer", "cancelTimer", "sleep",
"reboot", "shutdown", "version",
"epoch", "day", "clock", "time",
"loadAPI", "unloadAPI", "run",
},
},
table = {
fields = { "pack", "unpack" },
},
},
}
std = "lua51+cc"
-- _G.isRouterEnabled is a cross-module flag set/read at runtime; `_` is the
-- throwaway global used in router.lua.
globals = {
"isRouterEnabled",
"_",
}
-- `_VERSION` is a per-module convention (see CLAUDE.md) and intentionally unused.
ignore = {
"211/_VERSION", -- unused local _VERSION
}
max_line_length = false