I'd like to announce a new release of luacheck.
luacheck is a static analyzer and a linter for Lua which detects
issues like accidental globals, unused variables and values, etc. It
is fairly configurable and can be used as a part of automated testing,
manually from the command line or inside an editor. It can be
installed using luarocks.
The only new thing in luacheck 0.7.2 is a flow analysis pass replacing
old and naive AST-walking checker. This improves quality of unused
value detection in some cases, e.g. in the following snippet first
value assigned to `var` is now detected as unused:
local var = expr1()
if cond() then
var = expr2()
var = expr3()
In the next release I plan to add a few new diagnostics using data
gathered using flow analysis; I decided to make an intermediate
release as internally there were a lot of changes and I want to fix
any possible bugs before releasing 0.8.0.
Any feedback is welcome.
Happy New Year!