batteries/.luacheckrc
David Briscoe a5ebc1e501 lint: Fix shadow issues
Fix shadowing by using variables with a different name or _.

I don't think any of these warnings were actual bugs and fixed them to
maintain the same behaviour.
2022-03-03 10:17:34 -08:00

37 lines
1.2 KiB
Lua

return {
std = "lua51+love",
ignore = {
"143", -- Accessing an undefined field of a global variable.
"211", -- Unused local variable.
"212", -- Unused argument.
"212/self", -- Unused argument self.
"213", -- Unused loop variable.
"231", -- Local variable is set but never accessed.
"311", -- Value assigned to a local variable is unused.
"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)
},
},
["sort.lua"] = {
ignore = {
"142", -- Setting an undefined field of a global variable. (inside export)
},
},
}
}