fix: incorrect arg skip pattern for --check_out_path=
#3062
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(first thing first, this bug is NOT introduced by recent changes)
Problem
With #3051, now the default check output format is
pretty
.But I also want to parse the
check.json
, so I added--check_out_path=xxx
option is my team's project CI:--check_out_path=
, I then found that--num_threads=2
seems not working 😳--check_out_path=
at the end, it will work 🙄Investigation
Upon investigation, I found that the
--num_threads
argument is not passed to check workers if it is placed just after a--check_out_path=
.With further debugging, it is due to the incorrect skip pattern for
--check_out_path=
:lua-language-server/script/cli/check.lua
Lines 23 to 24 in b0b5c8f
%w
only matches alphanumeric characterscheck_out_path
contains underscore_
[%w_]
for it to work