Skip to content

dir_contains

Every directory matching select: must contain files matching every glob in require:. Sugar for a common for_each_dir shape.

- id: packages-have-readme-and-license
kind: dir_contains
select: "packages/*"
require: ["README.md", "LICENSE*"]
level: error
OptionTypeRequiredDefaultDescription
requirestring or list of stringyesBasename glob(s) — every dir matching select must have at least one child matching each.
selectstringyes

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.