2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
koreader/.luacheckrc
NiLuJe da65ac8b02
Cleanup various varargs shenanigans (#9624)
* Iterate over varargs directly via select if possible
* Use table.pack otherwise (https://github.com/koreader/koreader-base/pull/1535).
* This allows us to simplify a few Logger calls, as logger now handles nil values.
2022-10-12 19:59:48 +02:00

46 lines
1.0 KiB
Lua

unused_args = false
std = "luajit"
-- ignore implicit self
self = false
globals = {
"G_reader_settings",
"G_defaults",
"table.pack",
"table.unpack",
}
read_globals = {
"_ENV",
}
exclude_files = {
"frontend/luxl.lua",
"plugins/newsdownloader.koplugin/lib/handler.lua",
"plugins/newsdownloader.koplugin/lib/LICENSE_LuaXML",
"plugins/newsdownloader.koplugin/lib/xml.lua",
"plugins/newsdownloader.koplugin/lib/LICENCE_lua-feedparser",
"plugins/newsdownloader.koplugin/lib/dateparser.lua",
}
-- don't balk on busted stuff in spec
files["spec/unit/*"].std = "+busted"
files["spec/unit/*"].globals = {
"match", -- can be removed once luacheck 0.24.0 or higher is used
"package",
"requireBackgroundRunner",
"stopBackgroundRunner",
"notifyBackgroundJobsUpdated",
}
-- TODO: clean up and enforce max line width (631)
-- https://luacheck.readthedocs.io/en/stable/warnings.html
-- 211 - Unused local variable
-- 631 - Line is too long
ignore = {
"211/__*",
"231/__",
"631",
"dummy",
}