MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / doctor_check_plugin_rule

Function doctor_check_plugin_rule

src/agents/cursor.rs:852–872  ·  view source on GitHub ↗
(dc: &mut DoctorCounters, rule_path: &Path)

Source from the content-addressed store, hash-verified

850}
851
852fn doctor_check_plugin_rule(dc: &mut DoctorCounters, rule_path: &Path) {
853 if !rule_path.exists() {
854 dc.warn(&format!(
855 "{} not found — run `tracedecay install --agent cursor`",
856 rule_path.display()
857 ));
858 return;
859 }
860 let contents = std::fs::read_to_string(rule_path).unwrap_or_default();
861 if contents.contains("alwaysApply: true") && contents.contains("tracedecay MCP tools") {
862 dc.pass(&format!(
863 "Cursor plugin tracedecay rule active in {}",
864 rule_path.display()
865 ));
866 } else {
867 dc.fail(&format!(
868 "Cursor plugin tracedecay rule is incomplete in {} — run `tracedecay install --agent cursor`",
869 rule_path.display()
870 ));
871 }
872}
873
874#[cfg(test)]
875#[allow(clippy::unwrap_used, clippy::expect_used)]

Callers 1

doctor_check_pluginFunction · 0.85

Calls 5

existsMethod · 0.80
warnMethod · 0.80
passMethod · 0.80
failMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected