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-filesand--include-filesoptions 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
noto invert meaning. - New built-in global set
bustedcontaining globals of Busted testing framework. - Stable interface for editor plugins.
- New
luacheck.get_messagefunction for formatting a message for a warning or error. - Sets of standard globals can be merged using
+. - If value of
stdoption starts with+, new set is added to old one instead of overwriting it, - New
--filenameoption allows using real file name for picking config per-path overrides while passing source through stdin or a temporary file. - New
--rangesoption provides column ranges for tokens related to warnings. - New
--no-selfoption for ignoring warnings related to implicitselfargument. - 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
stdsin config. formatterconfig option now accepts functions.- Warnings returned from
luacheck.*functions now have.end_columnfield with last column of related token. - JUnit formatter now produces a testcase per each issue.
Fixes:
- Fixed validation error when attempting to use
formatteroption in config. - Fixed incorrect error location for
invalid escape sequencesyntax errors. - FIxed spurious quotes in typecheck error messages in
luacheck.*functions. - UTF BOM is now stripped when reading files.
Breaking changes:
- Removed
--no-unused-globalsoption, use--ignore 13instead. - Removed
.varargfield for warnings related to varargs, check.name == "..."instead. - Errors now also have codes, starting with
0, and are returned together with warnings fromluacheck.*functions.