0.11.0
New features and improvements:
- During config lookup all directories starting from current one and up to file system root are traversed in search of config. Path-related data from config loaded from an upper directory is adjusted to work as if Luacheck was started from the directory with config.
- New
--exclude-files
and--include-files
options for file filtering using globbing patterns. - More CLI and config options can be used inline.
- Underscores in inline option names can be replaced with spaces.
- Inline options without arguments can be prefixed with
no
to invert meaning. - New built-in global set
busted
containing globals of Busted testing framework. - Stable interface for editor plugins.
- New
luacheck.get_message
function for formatting a message for a warning or error. - Sets of standard globals can be merged using
+
. - If value of
std
option starts with+
, new set is added to old one instead of overwriting it, - New
--filename
option allows using real file name for picking config per-path overrides while passing source through stdin or a temporary file. - New
--ranges
option provides column ranges for tokens related to warnings. - New
--no-self
option for ignoring warnings related to implicitself
argument. - Config options can now be returned as a table.
- Config now has access to all regular globals in its environment.
- New sets of standard globals can be created by mutating global
stds
in config. formatter
config option now accepts functions.- Warnings returned from
luacheck.*
functions now have.end_column
field with last column of related token. - JUnit formatter now produces a testcase per each issue.
Fixes:
- Fixed validation error when attempting to use
formatter
option in config. - Fixed incorrect error location for
invalid escape sequence
syntax errors. - FIxed spurious quotes in typecheck error messages in
luacheck.*
functions. - UTF BOM is now stripped when reading files.
Breaking changes:
- Removed
--no-unused-globals
option, use--ignore 13
instead. - Removed
.vararg
field for warnings related to varargs, check.name == "..."
instead. - Errors now also have codes, starting with
0
, and are returned together with warnings fromluacheck.*
functions.