Skip to content

filename_regex

Basename matches a regex. Use stem: true to match the stem only.

- id: toml-kebab-or-cargo
kind: filename_regex
paths: "**/*.toml"
stem: true
pattern: "[a-z][a-z0-9_-]*|Cargo"
level: warning

OptionTypeRequiredDefaultDescription
patternstringyesRust regex, automatically anchored with ^…$ by the engine.
stembooleanfalseMatch the file stem (no extension) instead of the full basename.

Plus the common paths, level, id, and when fields. This table is generated from the JSON Schema; option types and defaults are authoritative.