Closed Zash closed 6 years ago
This sounds helpful, I've made mistakes like that one. Should be easy to implement, too, just go through the AST recursively looking for ForNum
nodes with limits like that. Just need to figure out the warning code. Probably something in 5xx
.
Implemented on master branch.
Consider a for loop like this:
This is very likely a mistake, and the intention was to iterate down over some array, ie:
Is this something luacheck can or should point out?