Skip to content
Snippets Groups Projects
Commit a13d5174 authored by Erick Hitter's avatar Erick Hitter
Browse files

Better PHPCS

parent 251ae1c1
Branches
No related tags found
1 merge request!1Add GitLab CI
Pipeline #114 failed
.DS_Store
phpcs.xml
phpunit.xml
Thumbs.db
wp-cli.local.yml
......
......@@ -49,7 +49,7 @@ PHPunit:PHP5.3:MySQL:
services:
- mysql:5.6
script:
- phpcs
- phpcs -n
- phpunit
allow_failure: true
......@@ -58,7 +58,7 @@ PHPunit:PHP5.6:MySQL:
services:
- mysql:5.6
script:
- phpcs
- phpcs -n
- phpunit
PHPunit:PHP7.0:MySQL:
......@@ -66,7 +66,7 @@ PHPunit:PHP7.0:MySQL:
services:
- mysql:5.6
script:
- phpcs
- phpcs -n
- phpunit
PHPunit:PHP7.1:MySQL:
......@@ -74,7 +74,7 @@ PHPunit:PHP7.1:MySQL:
services:
- mysql:5.6
script:
- phpcs
- phpcs -n
- phpunit
PHPunit:PHP7.2:MySQL:
......@@ -82,5 +82,5 @@ PHPunit:PHP7.2:MySQL:
services:
- mysql:5.6
script:
- phpcs
- phpcs -n
- phpunit
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>
<!--
Pass some flags to PHPCS:
p flag: Show progress of the run.
s flag: Show sniff codes in all reports.
-->
<arg value="ps" />
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./" />
<!-- Check up to 8 files simultaneously. -->
<arg name="parallel" value="8" />
<!-- Only check the PHP files. -->
<arg name="extensions" value="php" />
<!-- Check all files in this directory and the directories below it. -->
<file>.</file>
<!-- Exclude a few directories and autogenerated files. -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/</exclude-pattern>
<rule ref="WordPress" />
<rule ref="WordPressVIPMinimum" />
<!--<rule ref="WordPress-VIP-Go" />-->
<config name="minimum_supported_wp_version" value="4.9" />
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array" value="camo" />
</properties>
</rule>
</ruleset>
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>
<rule ref="WordPress-Core" />
<rule ref="WordPress-Docs" />
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
<file>.</file>
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
</ruleset>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment