[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] Luacheck 0.23.0
- From: Peter Melnichenko <mpeterval@...>
- Date: Tue, 18 Sep 2018 23:34:55 +0300
Hi list,
I've released Luacheck 0.23.0. Luacheck is a linter for Lua, detecting
accidental globals, unused variables and values, unreachable code, etc.,
see https://github.com/mpeterv/luacheck.
To install it with LuaRocks run `luarocks install luacheck`.
Changelog:
Breaking changes
* Removed `--no-inline` CLI option and `inline` config option, inline options
are now always enabled.
* Inline option comments are now supposed to be only in short
comments (-- ...) but not long ones (--[[...]]).
* Installer script (install.lua) is removed. Luacheck can still be installed
manually by recursively copying `src/*` to a directory in `package.path`
and copying `bin/luacheck.lua` to a directory in `PATH` as `luacheck`.
New features and improvements
* Warning columns are now reported in Unicode codepoints if input is
valid UTF-8.
* Added indentaion-based guessing of a better location for missing `end`
and `until` syntax errors.
* Added `luacheckrc` set of allowed globals containing globals used in
Luacheck config to set options.
* Added default stds equivalent to predefined per-path std overrides
in config:
- `files["**/spec/**/*_spec.lua"].std = "+busted"`;
- `files["**/test/**/*_spec.lua"].std = "+busted"`;
- `files["**/tests/**/*_spec.lua"].std = "+busted"`;
- `files["**/*.rockspec"].std = "+rockspec"`;
- `files["**/*.luacheckrc"].std = "+luacheckrc"`.
* Added detection of numeric for loops going from `#t` to `1` without
negative step.
* Added support for LuaRocks 3 module autodetection when checking
rockspecs.
* Updated `love` standard for LÖVE 11.1.
Changes
* Default set of standard globals is now always `max`, allowing globals of all
Lua versions. `_G` std is deprecated.
Fixes
* Added missing globals to `rockspec` std: `hooks`, `deploy`,
`build_dependencies`, `test_dependencies`, and `test`.
* Fixed line lengths appearing in the output before other warnings on the same
line even if their column numbers are smaller.
Miscellaneous
* Luacheck now depends on argparse instead of bundling it.
* LuaFileSystem dependency is now required.
Any feedback is appreciated!
-- Best regards,
-- Peter Melnichenko