Skip to content

Releases: mpeterv/luacheck

0.12.0

02 Nov 17:43
Compare
Choose a tag to compare

New features/improvements:

  • New ngx_lua globals set for Openresty ngx_lua module (#41).
  • Better CLI error messages.

Fixes:

  • Fixed duplicate "uninitialized access" and "unreachable code" warnings in nested functions.

Miscellaneous:

  • RTD theme is no longer required when building docs.
  • HTML docs are no longer stored in the repo.

0.11.1

09 Aug 16:44
Compare
Choose a tag to compare

Improvements:

  • More accurate analysis around literal conditions, e.g. while true do ... end.
  • Extra threads are not created when number of files is less than value of --jobs option.

Fixes:

  • Fixed crash on unreachable repeat condition (#36).
  • Fixed crash when using --ranges with cache.
  • Fixed incorrect output or crashes when loading cache created by a different version (#37).
  • Fixed crash when an upvalue is followed by an infinite loop.

0.11.0

18 Jul 14:34
Compare
Choose a tag to compare

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 implicit self 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 from luacheck.* functions.

0.10.0

13 Mar 18:38
Compare
Choose a tag to compare

New features:

  • Added caching of check results (--cache and --no-cache options).
  • Added parallel checking (--jobs/-j option).
  • Added reporting of syntax error message and location in CLI.
  • Added --version command for showing versions of Luacheck and its dependencies.
  • Added more functions to luacheck Lua module.

Fixes:

  • Fixed file status label not being colored when using -qq.

Breaking changes:

  • Removed --limit/-l option, use inline options to ignore warnings that are OK.
  • Removed --no-unused-values/-v option, use --no-unused-secondaries/-s instead.
  • Removed --no-unset option, use --ignore 221 instead.

Miscellaneous:

  • Added installer script.

0.9.0

15 Feb 09:14
Compare
Choose a tag to compare
  • Added inline options: a way to precisely configure luacheck using inline comments of special format.
  • Added an option to use custom output formatters; TAP and JUnit formatters are built-in.
  • Fixed crash when checking stdin using a config with overrides.

0.8.0

19 Jan 16:32
Compare
Choose a tag to compare
  • Added new diagnostics:
    • Added detection of unused labels;
    • Added detection of unreachable code;
    • Added detection of loops that can be executed at most once;
    • Added detection of uninitialized variables;
    • Added detection of shadowed local variables;
    • Added detection of empty blocks;
    • Added detection of unbalanced assignments;
  • New warning categorization system using warning codes;
  • Added possibility to mark globals as read-only (most standard globals are so by default);
  • Added possibility to overwrite options on per-directory basis in config;
  • Some CLI-specific options can now be used in config (e.g. color);
  • Removed unnecessary dependencies, simplified manual installation;
  • Added executable wrapper for Windows, thanks @andrewstarks;
  • Added standard global sets for Lua 5.3;
  • Some minor fixes and improvements.

0.7.3

05 Jan 19:57
Compare
Choose a tag to compare
  • Fixed false unused variable and unused value warnings when a closure accessing variable is created in a nested block (thanks @CheyiLin).

0.7.2

03 Jan 17:50
Compare
Choose a tag to compare
  • Improved analysis quality w.r.t unused values using flow analysis.

0.7.1

16 Dec 08:12
Compare
Choose a tag to compare
  • When --no-color is used, identifiers are now quoted in warning messages, thanks @tbastos.
  • Fixed priority of options: CLI options override config per-file overrides, which override general config.
  • Fixed ignoring std option in CLI when compat option is used in config.

0.7.0

23 Nov 17:39
Compare
Choose a tag to compare
  • Added --allow-defined-top and `--module`` options for more flexible checking of files which are supposed to set globals.
  • Added --no-unused-secondaries option for removing warnings about unused values set together with used ones.
  • Added detection of variables that are used bet never set.
  • Fixed ignoring std config option.
  • Fixed incompatibility with Lua 5.3.