mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-29 17:06:45 +00:00
fix(#704): DiagnosticCheck.json_value now emits stable snake_case id field; doctor checks addressable without scraping name prose
This commit is contained in:
@@ -2018,7 +2018,14 @@ impl DiagnosticCheck {
|
||||
}
|
||||
|
||||
fn json_value(&self) -> Value {
|
||||
// Derive a stable snake_case id from the check name for machine-readable keying (#704).
|
||||
let id = self
|
||||
.name
|
||||
.to_ascii_lowercase()
|
||||
.replace(' ', "_")
|
||||
.replace('-', "_");
|
||||
let mut value = Map::from_iter([
|
||||
("id".to_string(), Value::String(id.clone())),
|
||||
(
|
||||
"name".to_string(),
|
||||
Value::String(self.name.to_ascii_lowercase()),
|
||||
|
||||
Reference in New Issue
Block a user