Please sign in to comment.
Rework inline options processing and report filtering
Instead of only listing all inline options, pushes, and pops in inline options during checking, compile all of them into more compact instructions describing how option stack should be updated for each line when filtering. Option stacks are the same within each line. On each line there can be a push of a new option table (only one now that inline options are not allowed in long comments), and/or a pop of a given number of inline options. Inline options module becomes just another check stage, filtering no longer interacts with it as the provided check result is easy enough to work with. Organize report filtering more efficiently, doing all the work in just two passes. Also, fix a bug with line length warnings always appearing in the output earlier than other warnings on the same line because it used 1 as column before warnings were sorted.
- Loading branch information...
Showing with 799 additions and 874 deletions.
- +3 −0 CHANGELOG.md
- +1 −1 luacheck-dev-1.rockspec
- +27 −30 spec/cache_spec.lua
- +30 −19 spec/check_spec.lua
- +1 −1 spec/cli_spec.lua
- +28 −19 spec/filter_spec.lua
- +1 −1 spec/luacheck_spec.lua
- +22 −32 src/luacheck/cache.lua
- +25 −17 src/luacheck/check.lua
- +10 −0 src/luacheck/check_state.lua
- +9 −28 src/luacheck/core_utils.lua
- +289 −281 src/luacheck/filter.lua
- +0 −440 src/luacheck/inline_options.lua
- +1 −2 src/luacheck/profiler.lua
- +1 −3 src/luacheck/stages.lua
- +351 −0 src/luacheck/stages/parse_inline_options.lua
Oops, something went wrong.