for loops bug
Linter allows this:
fori = 1 , 3do
end
It's kinda weird, but the problem is probably not with the for loop, but with 3do end
EDIT: yep the problem is with "3do end" as formatter formats it into:
fori = 3
do
end
Ah, indeed fori = 1, 3 is valid Lua, but the 3do part is not. Lua itself complains about it being a malformed number. glualint is fine lexing it as the number 3 followed by the keyword do.
I think the difference is in that Lua number parsing works like "parse a number followed by a bunch of letters, then check later if those letters make sense". Glualint parses numbers as the very precise set of characters in the order that they are allowed.
Fix released in https://github.com/FPtje/GLuaFixer/releases/tag/1.29.0