Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to show only error on codesniffer

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?

like image 537
Qaisar Satti Avatar asked Dec 09 '16 09:12

Qaisar Satti


People also ask

Can I use codesniffer to analyse PHP code?

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.

How to check if a file contains sniffs?

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

How do I ignore a single line in a comment?

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.


1 Answers

Thanks @GregSherwood following this link

phpcs -n --standard=MEQP1 pathtofile
like image 72
Qaisar Satti Avatar answered Oct 08 '22 11:10

Qaisar Satti