every_matching_has
For every file or directory matching select:, every nested rule under require: must be satisfied. Lightweight sibling of pair that iterates both file and directory entries. select: is a single glob or a list with !-prefixed excludes (e.g. ["packages/*", "!packages/internal"]).
- id: every-pkg-has-readme kind: every_matching_has select: "packages/*" require: - kind: file_exists paths: "{path}/README.md" level: errorOptions
Section titled “Options”| Option | Type | Required | Default | Description |
|---|---|---|---|---|
require | list of nested rule | yes | ||
select | string or list of string | yes | Glob(s) selecting the files/dirs to iterate — a single glob, or a list with !-prefixed excludes (e.g. [“packages/*”, “!packages/internal”]). | |
when_iter | string | Per-iteration when: filter — see rule_for_each_dir.when_iter. |
Plus the common level, id, and when fields. This rule analyses the whole repository, so it takes no paths. This table is generated from the JSON Schema; option types and defaults are authoritative.