Expand description
Comment-preserving formatter for Sigma YAML.
format_yaml rewrites a Sigma file into the canonical layout that
emit_rule_yaml produces, keeping comments,
anchors, aliases, tags, and directives. Every result is checked against the
source: the YAML values, the parsed Sigma rules, and the attachment of every
comment must be unchanged, or the call fails with FormatError::Guard.
Structs§
- Format
Outcome - The result of formatting a whole file.
- Range
Edit - A single splice that replaces one region of the source with canonical text.
Enums§
- Format
Error - Why a file could not be formatted.
Functions§
- format_
yaml - Format a whole Sigma YAML file.
- format_
yaml_ range - Format only the smallest block mapping that contains
start..end.