mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-22 14:14:36 +00:00
lint: Don't set unused locals
Not a bug, but pointless to store this variable since it's not used.
This commit is contained in:
parent
9083ee74ca
commit
d6af9f74c5
@ -5,7 +5,6 @@ return {
|
|||||||
"212", -- Unused argument.
|
"212", -- Unused argument.
|
||||||
"212/self", -- Unused argument self.
|
"212/self", -- Unused argument self.
|
||||||
"213", -- Unused loop variable.
|
"213", -- Unused loop variable.
|
||||||
"231", -- Local variable is set but never accessed.
|
|
||||||
"311", -- Value assigned to a local variable is unused.
|
"311", -- Value assigned to a local variable is unused.
|
||||||
"631", -- Line is too long.
|
"631", -- Line is too long.
|
||||||
},
|
},
|
||||||
|
@ -171,9 +171,7 @@ function stringx.deindent(s, keep_trailing_empty)
|
|||||||
--split along newlines
|
--split along newlines
|
||||||
local lines = stringx.split(s, newline)
|
local lines = stringx.split(s, newline)
|
||||||
--detect and strip any leading blank lines
|
--detect and strip any leading blank lines
|
||||||
local leading_newline = false
|
|
||||||
while lines[1] == "" do
|
while lines[1] == "" do
|
||||||
leading_newline = true
|
|
||||||
table.remove(lines, 1)
|
table.remove(lines, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user