CLI-06: Narrow the run with --include
What it demonstrates
Section titled “What it demonstrates”–include scopes a directory run to a glob, validating only the matching subset.
Builds on: CLI-05: Validate a whole directory
How it’s done
Section titled “How it’s done”A terminal session: the command as you’d run it, followed by the output it prints; trailing comments note the exit status.
# narrow the same run to a glob: only files matching tasks/**/*.md are validatedmarkdown-contract validate ./planning --include 'tasks/**/*.md' --contract planning.contract.yamlScanned 2 files; 1 matched, 1 unmatched
tasks/T-9001.md:4 error frontmatter/enum — frontmatter field ‘status’ must be one of ‘planning/draft’, ‘planning/proposed’, ‘planning/needs-definition’, ‘planning/backlog’, ‘open/ready’, ‘in-progress’, ‘in-progress/blocked’, ‘closed/done’, ‘closed/superseded’, ‘closed/partially-superseded’, ‘closed/obsoleted’, ‘closed/relocated’, ‘closed/no-repro’, ‘closed/wontdo’
1 finding(s): 1 error, 0 warn, 0 report# exit status: 1 (error-level findings)Surfaces exercised
Section titled “Surfaces exercised”--include glob (run-root-relative; --glob is its alias)runner include filter