module

Ignorelint::Checks::DockerignoreSemantics

Semantic checks specific to dockerignore files.

These rules catch patterns that exploit dockerignore quirks or indicate a misunderstanding of dockerignore matching behavior.

Instance methods

check(pat : Pattern) : Array(Issue)

Check a single pattern for dockerignore-specific issues.

Checks:

  • IG-014: Path traversal (../) — security risk, allows accessing files outside the Docker build context
  • IG-015: Leading / has no effect — dockerignore strips it
  • IG-015: Trailing / has no effect — dockerignore strips it