Skip to content

DECLARATIVE-YAML-18: Bound occurrences with min / max

min and max constrain how many times a phrase may occur; max: 0 is the in-section forbids dual.

Builds on: DECLARATIVE-YAML-15: Forbid a phrase document-wide

The declarative YAML artifact, verbatim — no code required.

body:
sections:
- section: Output contract
requires:
- pattern: "DONE pr="
min: 1 # present at least once (the default)
- pattern: "WARNING"
max: 0 # must NOT appear in this section (forbids dual)
  • min/max occurrence count
  • forbids == requires{max:0}
  • text/count finding