Skip to content

redundant-pattern

INI / EditorConfig / .gitignoresuspiciousno fixdefault: off

Reports a foo/ or /foo pattern that follows a plain foo, with no ! pattern between them: a name pattern already matches files and directories called foo at every level.

The later pattern adds nothing, and a reader may think it is more specific than the first.

To fix, delete the later pattern.

Reported
build
/build/
out/
bin
!bin
...
gitignore:
lint:
rules:
redundant-pattern: warn # off (default), warn, error

Suppress one line with sudsy-disable-next-line redundant-pattern in a comment of the file’s language.