PHP_CodeSniffer
PHP_CodeSniffer copied to clipboard
Allow wildcard/patterns/group run for --sniffs
Specifying --sniffs=Squiz.WhiteSpace shows sniff as invalid. I would expect it'll run all sniffs in that category.
When I run:
phpcbf --standard=Squiz --sniffs='Squiz.WhiteSpace.*' src/
it's running, but I've got:
No fixable errors were found
However when I run:
phpcbf --standard=Squiz --sniffs=Squiz.WhiteSpace.SuperfluousWhitespace src/
it works.
The --sniffs command line argument has always required full sniff codes, as is documented everywhere like that. That's why partial codes or wildcards are not working for you. Those are not sniff codes.
However, being able to use partial codes is something I've been thinking about building for a while, so I'm going to leave this open a feature request. I have no idea when I'd ever get around to it, but it's a nice feature to have for debugging at least.