Open haoadoreorange opened 3 years ago
You can set any Cargo command for checkOnSave.command
, so as long as the other linter works as a subcommand like clippy (and supports JSON output), you can configure it the same way.
You can set any Cargo command for
checkOnSave.command
, so as long as the other linter works as a subcommand like clippy (and supports JSON output), you can configure it the same way.
Do you have any reference for the JSON output of clippy (what format should it be, specs, ...etc.) ? I looked around but couldn't find anything anywhere., so I'm a bit looking to a black box here.
You can start from flycheck
, it's the part of RA that runs cargo check
. But I suspect that even running that yourself on a project with a couple of errors and warnings will be illuminating (clippy shares the same protocol as cargo check).
Thanks I will start with that.
One more question regarding the option checkOnSave.command
, is the description msg a bit confuse or I misunderstand. It says Cargo command to use for cargo check
so it is as if cargo check
will always be used (which doesn't make sense cuz there no subcommand anw). I ask because there is also an option overrideCommand
.
You can set the first one to clippy or the second one to cargo clippy --message-format=json. The first one is a convenience.
Ok so maybe the msg should change a bit for clarification ? What do you think ?
"to use with cargo
instead of check
" would probably be more precise.
Hi, Sorry if this is not the right place to ask. Currently I see no way to use another linter rather than clippy. Is there any hacky way to achieve this ?