Skip to content

phpcs: The "WordPress" coding standard is not installed. Please review your configuration an try again. #2427

@brothman01

Description

@brothman01

I have been using phpcs with wpcs for a while so I am confused here.

Bug Description

What did you expect to happen? What actually happened?
I expected it to lint the file.
-->

Minimal Code Snippet

When I execute phpcs index.php --standard="WordPress" in a terminal I get the error "ERROR: Referenced sniff "PHPCSUtils" does not exist".

When I execute phpcs -i in a terminal I can see that WordPress is in the installed list.
"The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend, WordPress, WordPress-Core, WordPress-Docs and WordPress-Extra"

The code in the file

The code in the php file does not matter because the command cannot be executed.

The PSR2 standard does work, so I do not think the problem is not with the phpcs installation.
-->

Environment

Question Answer
PHP version 8.2.12
WordPressCS install type Composer global
IDE (if relevant) VSCode 1.87.0

Tested Against develop Branch?

  • [√ ] I have verified the issue still exists in the develop branch of WordPressCS. [that is the branch I am using]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions