任何在 codesniffer 上只显示错误的方法

Any way to show only error on codesniffer

我只想在 codesniffer 中看到 error。因为文件有太多警告,而我只更正了错误。谁知道怎么做?

感谢@GregSherwood 关注此 link

phpcs -n --standard=MEQP1 pathtofile

另一种可能的解决方案是。

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

pathtofile替换成你自己的文件或目录。