0.22.0
New features and improvements:
- Added detection of cyclomatic complexity, with warnings emitted for
functions with complexity higher than a configurable limit; disabled
by default (#141). - Added a built-in formatter printing warnings and errors in a format
understood by MSBuild/Visual Studio ifluacheck
is
used as a custom build step (#142). ranges
andquiet
options can now be used in config, e.g.quiet = 1
to
disableOK
lines in default formatter output.luacheck
module now addsprev_line
,prev_column
, andprev_end_column
fields to syntax error events if they refer to some extra location:
redefined label errors point to the previous definition,
unpaired tokens such asfunction
/end
point to the the first token (#134).luacheck
module now addsprev_end_column
field to warning events that
already haveprev_line
andprev_column
fields, andoverwritten_end_column
for warnings withoverwritten_line
andoverwritten_column
.- Improved error messages for invalid options and config: when an option is
invalid, extra context is provided instead of just the name. - Custom stds are now validated on config load.
- When recursively checking a directory, each failure to list a nested
directory is now reported separately, and other found files and directories
are checked anyway. Previously any error when listing any nested directory
resulted in immediate failure for the entire parent directory (#159). - When
--[no-]cache
CLI option is used with LuaFileSystem not found,
it is now ignored instead of causing an error. Missing LuaFileSystem is now
mentioned in the help message next to features disabled without it.
Fixes:
- Fixed errors or incorrect reporting when unused mutually recursive functions
have other values assigned to their local variables. - Fixed unused values in infinite loops sometimes reported
as overwritten by another value. - Fixed caching not working properly when cache is enabled in config
loaded from a parent directory. - Fixed per-path config overrides not working on Windows when paths in config
and input paths use different case (#150). - Added missing definition of
love.handlers
tolove
std (#161).
Miscellaneous:
- Installer script (install.lua) is deprecated. Future versions of Luacheck
may have required dependencies. Luacheck can still be installed manually
by recursively copyingsrc/luacheck
to a directory inpackage.path
and copyingbin/luacheck.lua
to a directory inPATH
asluacheck
.