Skip to content

Add --ignore-file flag for .dockerignore, .prettierignore, etc. #457

@kehoecj

Description

@kehoecj

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)

Metadata

Metadata

Assignees

Labels

CLIUpdate to the CLIhas-prThis issue has an associated PRhelp wantedExtra attention is neededvalidator-coreIssues that relate to the core validator functionality

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions