Skip to content

Conversation

@blaind
Copy link

@blaind blaind commented Sep 21, 2025

I'm using cargo-ndk as a rust-analyzer.check.overrideCommand in vscode.

As follows

cargo ndk check --message-format=json-diagnostic-rendered-ansi --keep-going

Currently, if the command would see any errors, the output would be captured and printed human-style.

This merge request checks, if user has overridden the message format. The printout is also selected to be json or formatted, depending on the argument. Based on list at https://doc.rust-lang.org/cargo/commands/cargo-check.html#display-options

MessageFormat::Json
}
"json-render-diagnostics" => MessageFormat::Other,
_ => MessageFormat::NotSet,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this ok? Or should it be other?


/// The output format for cargo messages.
#[derive(Debug, PartialEq)]
pub enum MessageFormat {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The namings for enum values could be better

@bbqsrc
Copy link
Owner

bbqsrc commented Oct 31, 2025

This would interfere with the message handling already implemented to determine what the output dependencies are, so requires more thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants