Skip to content

Commit

Permalink
Remove explicit function for rule 10404 as it is now handled in the t…
Browse files Browse the repository at this point in the history
…ype check phase.
  • Loading branch information
daemontus committed Mar 6, 2024
1 parent 2764e67 commit 8435310
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/core/validation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,18 +380,3 @@ pub(crate) fn apply_rule_10402(annotation: &XmlElement, issues: &mut Vec<SbmlIss
}
}
}

// TODO: might be placed inside SBASE validation method
/// ### Rule 10404
/// A given SBML element may contain at most *one* **Annotation** subobject.
pub(crate) fn apply_rule_10404(element: &XmlElement, issues: &mut Vec<SbmlIssue>) {
let annotation_elements = element.child_elements_filtered(|el| el.tag_name() == "annotation");

if annotation_elements.len() > 1 {
let message = format!(
"Multiple annotation elements found in <{0}>.",
element.tag_name()
);
issues.push(SbmlIssue::new_error("10404", element, message));
}
}

0 comments on commit 8435310

Please sign in to comment.