Skip to content

Commit

Permalink
Merge pull request #476 from GoogleChromeLabs/add/vipwpcs
Browse files Browse the repository at this point in the history
Add WordPress-VIP-Go coding standard for PHPCS
  • Loading branch information
westonruter authored Apr 29, 2021
2 parents a7c41d4 + 9de5c7e commit dc0d2fd
Show file tree
Hide file tree
Showing 11 changed files with 262 additions and 19 deletions.
8 changes: 7 additions & 1 deletion .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<!-- What to scan -->
<file>.</file>

<!-- Ignoring Files and Folders:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders -->
<exclude-pattern>./node_modules/</exclude-pattern>
Expand All @@ -17,7 +18,7 @@
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="colors"/> <!-- Show results with colors -->
<arg name="basepath" value="."/> <!-- Strip the file paths down to the relevant bit -->
<arg name="parallel" value="8"/> <!-- Enables parallel processing when available for faster results. -->
<arg name="parallel" value="20"/> <!-- Enables parallel processing when available for faster results. -->
<arg name="extensions" value="php"/> <!-- Limit to PHP files -->

<!-- Rules: Check PHP version compatibility - see
Expand Down Expand Up @@ -55,6 +56,11 @@
</properties>
</rule>

<rule ref="WordPress-VIP-Go">
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>bin/*</exclude-pattern>
</rule>

<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"php": "^5.6 || ^7.0 || ^8.0"
},
"require-dev": {
"automattic/vipwpcs": "^2.2",
"dealerdirect/phpcodesniffer-composer-installer": "0.7.1",
"phpcompatibility/phpcompatibility-wp": "2.1.1",
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5",
Expand Down
Loading

0 comments on commit dc0d2fd

Please sign in to comment.