Skip to content

Commit d58f565

Browse files
Update ignore patterns explanation in documentation
Clarified the explanation of ignore patterns for PHP_CodeSniffer.
1 parent 6624b9a commit d58f565

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wiki/Advanced-Usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $ phpcs --ignore=*/tests/*,*/data/* /path/to/code
3636
```
3737

3838
> [!IMPORTANT]
39-
> The ignore patterns are treated as **case-insensitive** regular expressions. In addition to this, be aware that `*` is converted to `.*` for convenience in simple patterns, like those used in the example above. (So use `*` anywhere you would normally use `.*`.) Also ensure you escape any `.` characters that you want treated as a literal dot, such as when checking file extensions. So if you are checking for `.inc` in your ignore pattern, use `\.inc` or `\.inc$` instead.
39+
> The ignore patterns are treated as **case-insensitive** regular expressions. In addition to this, be aware that `*` is converted to `.*` for convenience in simple patterns, like those used in the example above. So use `*` anywhere you would normally use `.*`. Also ensure you escape any `.` characters that you want treated as a literal dot, such as when checking file extensions. So if you are checking for `.inc` in your ignore pattern, use `\.inc` or `\.inc$` instead.
4040
4141
You can also tell PHP_CodeSniffer to ignore a file using a special comment inserted at the top of the file. This will stop the file from being checked, even if it does not match the ignore pattern.
4242

0 commit comments

Comments
 (0)