batteries/.luacheckrc
David Briscoe 0c193d7901 lint: Don't assign values that will never be used
No bugs here, but giving an initial value can hide cases where we fail
to set a value. Use an assert instead so we can see errors if we change
and break this code.

Except break_next which goes out of scope after it's assigned (I guess
it used to be outside the loop).
2022-03-03 10:17:35 -08:00

34 lines
1.0 KiB
Lua

return {
std = "lua51+love",
ignore = {
"211", -- Unused local variable.
"212/self", -- Unused argument self.
"213", -- Unused loop variable.
"631", -- Line is too long.
},
files = {
["tests.lua"] = {
ignore = {
"211", -- Unused local variable. (testy will find these local functions)
},
},
["assert.lua"] = {
ignore = {
"121", -- Setting a read-only global variable. (we clobber assert)
},
},
["init.lua"] = {
ignore = {
"111", -- Setting an undefined global variable. (batteries and ripairs)
"121", -- Setting a read-only global variable. (we clobber assert)
"143", -- Accessing an undefined field of a global variable. (we use tablex as table)
},
},
["sort.lua"] = {
ignore = {
"142", -- Setting an undefined field of a global variable. (inside export)
},
},
}
}