wpdesk/wp-code-sniffer

Library for WP Desk Coding Standards in plugins.

Installs: 49 654

Dependents: 19

Suggesters: 0

Security: 0

Type:phpcodesniffer-standard

1.3.1 2024-11-14 07:59 UTC

README

Set of general WordPress standards enhanced by WP Desk coding style.

Installation & Usage

To install this set of standards simply add the library to your require-dev in composer.json or run:

composer require --dev wpdesk/wp-code-sniffer

Copy phpcs.xml.dist and .editorconfig to your project folder, then set needed config like text_domain, etc.

Integration with PHP Storm

Go to Settings→Languages & Frameworks→PHP→Quality Tools in PHP_CodeSniffer select Local in Configuration.

You can also select more settings by clicking .... Clear the path or set it to globally installed phpcs if you have locally installed dependencies.

Secondly, in Settings→Inspections→Quality Tools check the box PHP_CodeSniffer inspections and set coding standards to custom path pointing to your phpcs.xml.dist file.