Created
December 19, 2017 13:23
-
-
Save igmoweb/fc70bee19af46f42e48a11d70893ed13 to your computer and use it in GitHub Desktop.
PHPCS with a bunch of rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<ruleset name="My-Project"> | |
<description>Sniffs for the coding standards of your project.</description> | |
<file>.</file> | |
<!-- Exclude the Composer Vendor directory. --> | |
<exclude-pattern>/vendor/*</exclude-pattern> | |
<!-- Exclude the Node Modules directory. --> | |
<exclude-pattern>/node_modules/*</exclude-pattern> | |
<!-- wpcs installed path --> | |
<config name="installed_paths" value="/Users/ignacio/.composer/vendor/wp-coding-standards/wpcs" /> | |
<!-- PHPCS WP Aliases. Needed to execute WP Rules --> | |
<autoload>/Users/ignacio/.composer/vendor/wp-coding-standards/wpcs/WordPress/PHPCSAliases.php</autoload> | |
<!-- Just check php files --> | |
<arg name="extensions" value="php"/> | |
<!-- Colors! Nice! --> | |
<arg name="colors"/> | |
<!-- Full report --> | |
<arg name="report" value="full"/> | |
<rule ref="WordPress"> | |
<!-- Disable Yoda conditions check as an example. --> | |
<exclude name="WordPress.PHP.YodaConditions" /> | |
</rule> | |
<!-- Add this rule too --> | |
<rule ref="/Users/ignacio/.composer/vendor/fig-r/psr2r-sniffer/PSR2R/Sniffs/ControlStructures/NoInlineAssignmentSniff.php"/> | |
</ruleset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment