Description
The --gitignore flag lets users skip files matched by .gitignore patterns. Many projects also have other ignore files (.dockerignore, .prettierignore, .eslintignore) that use the same gitignore syntax. A new --ignore-file flag would let users apply these patterns during file discovery.
Proposed behavior
# Skip files matched by .dockerignore
validator --ignore-file=.dockerignore .
# Multiple ignore files (patterns are additive)
validator --ignore-file=.dockerignore --ignore-file=.prettierignore .
- Repeatable flag, each file adds more patterns
- Files use gitignore syntax (same parser as
--gitignore)
- Paths resolved relative to the search path root
- Missing files silently skipped (lenient)
- Config file support:
ignore-files = [".dockerignore"] in .cfv.toml
- Env var:
CFV_IGNORE_FILES (comma-separated)
Description
The
--gitignoreflag lets users skip files matched by.gitignorepatterns. Many projects also have other ignore files (.dockerignore,.prettierignore,.eslintignore) that use the same gitignore syntax. A new--ignore-fileflag would let users apply these patterns during file discovery.Proposed behavior
--gitignore)ignore-files = [".dockerignore"]in.cfv.tomlCFV_IGNORE_FILES(comma-separated)