Skip to content

no-duplicate-pattern

INI / EditorConfig / .gitignoresuspiciousno fixdefault: off

Reports a pattern that appears twice with no opposite pattern (!x for x) between the two, on the second.

The second pattern changes nothing. It is a copy and paste leftover that makes the file longer, and a reader looks for what it adds.

To fix, delete the second pattern.

Reported
*.log
build/
*.log
!keep.log
!keep.log
*.tmp
!*.tmp
*.tmp
gitignore:
lint:
rules:
no-duplicate-pattern: warn # off (default), warn, error

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