feat: add --check_format=json|pretty#3051
Conversation
b653f64 to
be9ba0d
Compare
9b961d0 to
3a4632a
Compare
|
I'm not sure if it makes sense in the scope of this. But it would be nice to return a nonzero exit code if results are found for CI builds to fail. If it is helpful, I recently did something similar for a Neovim plugin https://github.com/mikesmithgh/kitty-scrollback.nvim/blob/main/scripts/internal/__lua_language_server_check.lua |
|
First commit after the last release has already added this. |
|
awesome 9f25c27 yep I see it 🙌. Thanks! |
tomlau10
left a comment
There was a problem hiding this comment.
great work 👍
and I just tested it on windows and found some small issues
727715d to
14f8ee5
Compare
6998ad5 to
a5ee71c
Compare
Adds a new CLI option --check_format which accepts the values: 'json' (current behaviour), and a new 'pretty' value which prints a colorized human readable report to stdout, similar to common compilers and linters. Results are printed with color unless NO_COLOR is defined in the users environment, as per https://no-color.org. If --check_out_path is provided, then the results are always saved to file regardless of the --check_format value.
a5ee71c to
1545d8d
Compare
|
Great addition! I had previously built a tool to process diagnosis files with similar formatting (see llscheck). Here's how it looks in my implementation:
A couple of suggestions to enhance the output format:
That said, I find your diagnostic line formatting clearer than my implementation. Feel free to use parts of my code if that helps. |


Adds a new CLI option --check_format which accepts the values: 'json'
(current behaviour), and a new 'pretty' value which prints a colorized
human readable report to stdout, similar to common compilers and
linters.
Results are printed with color unless NO_COLOR is defined in the users
environment, as per https://no-color.org.
If --check_out_path is provided, then the results are always saved to
file regardless of the --check_format value.
I've made
prettythe default format, however to mitigate against any breakage I've made it also write the json files with--check_out_pathis provided, so this will be like enabling both formats at once.Other changes
check_worker.lua.--quietwork properly with--num_threads