最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

documentation - PHPStorm and CodeSniffer do not recognize WPCS

programmeradmin3浏览0评论
Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 3 years ago.

Improve this question

I'm trying to use Wordpress Coding Standards in my PHP Storm projects but I keep getting errors.

What I already did:

  1. I put it in composer.json:

    "require": { "squizlabs/php_codesniffer" : "3.*", "wp-coding-standards/wpcs": "2.3.0" }

  2. I configured CodeSniffer in the QualityTools option

  3. In Inspections -> PHP -> QualityTools, I put Wordpress in Coding Standard.

The problem:

Even though I've done all this, I'm still not able to evaluate the codes from WPCS. The following error is returned:

ERROR: The file "standard=WordPress" does not exist.

When I type phpcs -i, WordPress doesn't show up either:

The installed coding standards are MySource, PEAR, PSR1, PSR12, PSR2, Squiz and Zend

Can someone help me?

System details:

PHPStorm 2020.2.1
Windows 11
Composer global installation

发布评论

评论列表(0)

  1. 暂无评论