We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d7055e commit b90df79Copy full SHA for b90df79
crates/rust-analyzer/src/config.rs
@@ -571,13 +571,26 @@ impl Config {
571
None => tracing::info!("Invalid snippet {}", name),
572
}
573
574
+
575
+ self.validate(&mut errors);
576
577
if errors.is_empty() {
578
Ok(())
579
} else {
580
Err(ConfigUpdateError { errors })
581
582
583
584
+ fn validate(&self, error_sink: &mut Vec<(String, serde_json::Error)>) {
585
+ use serde::de::Error;
586
+ if self.data.checkOnSave_command.is_empty() {
587
+ error_sink.push((
588
+ "/checkOnSave/command".to_string(),
589
+ serde_json::Error::custom("expected a non-empty string"),
590
+ ));
591
+ }
592
593
594
pub fn json_schema() -> serde_json::Value {
595
ConfigData::json_schema()
596
0 commit comments