Closed jirutka closed 3 years ago
:+1: I'll check these out this week. Some of them, namely the unused imports and unused bit functions, are intentional. How would you suppress some of these warnings?
I think it's not easy to ignore. But you should prefixe by '_' each unused variable names. It becomes (humanly) easier to differenciate the already known cases between new cases.
Perhaps its best to comment out unused variables then. I'd rather do that than leave them as warnings.
Yes, but in some cases you can't :
for _i, v in ipairs({}) do print(v) end
_i
is unused but you can not remove it...
In this case:
for _i, v in ipairs({}) do print(v) end
it's common idiom to use _
as name of an unused yet required variable:
for _, v in ipairs({}) do print(v) end
I think this issue might be closed since all commits for luacheck
is merged already?
I think this issue might be closed since all commits for
luacheck
is merged already?
:+1: makes sense, feel free to close it @evkornev
All luacheck's related code is merged
Luacheck is very useful to prevent some mistakes.