PHP_CodeSniffer (PHPCS)
All code must be checked by the developer with PHPCS against the latest version of the VIP-Coding-Standards before the code is ready for approval and/or code review. We use “WordPress-VIP-Go” standard for all code.
PHPCS should also be part of every code review.
In both cases you can use the PHPCS and the VIP-rules from the cluster repository.
Example for a sniff against an plugin:
// This sniff hides the warnings and shows only error notifications
vendor/bin/phpcs plugins/fd-blablabla/ --warning-severity=0 --error-severity=3
Error messages must be fixed by the developer. But you can (still) ignore the warnings.
Under certain conditions, it may be possible to ignore individual code sniffer rules. The reason for this must be comprehensible and added to the ignore instruction as a comment.
