Any way to show only error on codesniffer
Asked Answered
S

2

6

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?

Sharlenesharline answered 9/12, 2016 at 9:51 Comment(6)
Why not fix the warnings? They're violating the defined set of coding standards for that project anyway.Concubinage
@ʰᵈˑ i have only advised to fix the errors because fixing warning may caused the functionality problem. that take too much time to fix.Sharlenesharline
In CodeSniffer.conf, is show_warnings set to 0?Concubinage
CodeSniffer.conf.dist added this but not working <?php $phpCodeSnifferConfig = array ( 'default_standard' => 'MEQP1', 'report_format' => 'summary', 'show_warnings' => '0', 'show_progress' => '1', 'report_width' => '120', ) ?>Sharlenesharline
If you don't want warnings, use the -n option : github.com/squizlabs/PHP_CodeSniffer/wiki/…Juliennejuliet
@GregSherwood thanksSharlenesharline
S
9

Thanks @GregSherwood following this link

phpcs -n --standard=MEQP1 pathtofile
Sharlenesharline answered 13/12, 2016 at 6:21 Comment(0)
T
0

Another possible solution would be.

phpcs -n --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md pathtofile

Replace pathtofile with the file or directory of your own.

Topliffe answered 8/5, 2019 at 12:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.