I want to see only error in codesniffer. Because file have too many warning and i have only correct the errors. Can any know how to to do that?
I'm using PHP_CodeSniffer to analyse my php code. The problem is that the code of my applications is quite complex (about 10,000 files) and it is a bit old (about 15 years) so it follows no standards like PSR. That's the reason why CodeSniffer produces very large reports.
If you want to only check your files for a small list of sniffs you can specify them on the command line Or you can run the whole coding standard and exclude a small list of sniffs
You can also ignore a single line using the phpcs:ignore comment. This comment will ignore the line that the comment is on, and the following line.
Thanks @GregSherwood following this link
phpcs -n --standard=MEQP1 pathtofile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With