[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Common Lua (Logic/Style etc) Errors Detectable Through Static Analysis
- From: Jon Akhtar <akhtar@...>
- Date: Tue, 15 Feb 2011 10:02:25 -0500
Here is the full list of my current inspections, so people don't have
to click the link:
-- Concatenation in a loop
while true do
-- warning here
a = a .. b
-- no warning here
c = a .. b
end
-- Divide by 0
a = a / 0
-- Mod by 0
b = b % 0
-- To few expressions
a, b, c, d, e, f = 1, 2
-- Function is last (cannot determine)
a, b, c = 1, b()
-- Function is first (unbalanced)
a, b, c = b(), 1
-- Global self
self = b
-- Accessing index 0
b = a[0]
-- Overwriting last element (NYI)
a[#a] = 1