VIP Coding Standards
This project contains two rulesets:
WordPressVIPMinimum- for use with projects on the (older) WordPress.com VIP platform.
WordPress-VIP-Go- for use with projects on the (newer) VIP Go platform.
Learn about why violations are flagged as errors vs warnings and what the levels mean.
Composer will install the latest compatible versions of PHPCS, PHPCSUtils, PHPCSExtra, WPCS and VariableAnalysis and register the external standards with PHP_CodeSniffer.
Please refer to the installation instructions for installing PHP_CodeSniffer for WordPress VIP for more details.
As of VIPCS version 2.3.0, there is no need to
require the PHP_CodeSniffer Standards Composer Installer Plugin anymore as it is now a requirement of VIPCS itself. Permission to run the plugin will still need to be granted though when using Composer 2.2 or higher.
Composer Project-based Installation
To install the VIP Coding Standards, run the following from the root of your project:
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev automattic/vipwpcs
Composer Global Installation
Alternatively, it can be installed standard globally for use across multiple projects:
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer global require --dev automattic/vipwpcs
Please see CONTRIBUTION.md.
Licensed under GPL-2.0-or-later.