validateAnnotations function

List<AnnotationIssue> validateAnnotations({
  1. required Directory referenceDir,
})

Recursively validates annotation markers under referenceDir.

Checks remove, insert, replace, and partial block pairing. Drop markers, Mustache unwrap comments, and spacing groups are not structurally validated.

Marker syntax and error messages: annotation reference.

Returns a list of AnnotationIssue values. Each issue formats as filePath:line:column: message via AnnotationIssue.toString.

Implementation

List<AnnotationIssue> validateAnnotations({required Directory referenceDir}) {
  return AnnotationValidator().validateDirectory(referenceDir);
}