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

Better PHPCS

parent 251ae1c1
No related branches found
No related tags found
1 merge request!1Add GitLab CI
Pipeline #114 failed
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
.DS_Store .DS_Store
phpcs.xml
phpunit.xml phpunit.xml
Thumbs.db Thumbs.db
wp-cli.local.yml wp-cli.local.yml
......
...@@ -49,7 +49,7 @@ PHPunit:PHP5.3:MySQL: ...@@ -49,7 +49,7 @@ PHPunit:PHP5.3:MySQL:
services: services:
- mysql:5.6 - mysql:5.6
script: script:
- phpcs - phpcs -n
- phpunit - phpunit
allow_failure: true allow_failure: true
...@@ -58,7 +58,7 @@ PHPunit:PHP5.6:MySQL: ...@@ -58,7 +58,7 @@ PHPunit:PHP5.6:MySQL:
services: services:
- mysql:5.6 - mysql:5.6
script: script:
- phpcs - phpcs -n
- phpunit - phpunit
PHPunit:PHP7.0:MySQL: PHPunit:PHP7.0:MySQL:
...@@ -66,7 +66,7 @@ PHPunit:PHP7.0:MySQL: ...@@ -66,7 +66,7 @@ PHPunit:PHP7.0:MySQL:
services: services:
- mysql:5.6 - mysql:5.6
script: script:
- phpcs - phpcs -n
- phpunit - phpunit
PHPunit:PHP7.1:MySQL: PHPunit:PHP7.1:MySQL:
...@@ -74,7 +74,7 @@ PHPunit:PHP7.1:MySQL: ...@@ -74,7 +74,7 @@ PHPunit:PHP7.1:MySQL:
services: services:
- mysql:5.6 - mysql:5.6
script: script:
- phpcs - phpcs -n
- phpunit - phpunit
PHPunit:PHP7.2:MySQL: PHPunit:PHP7.2:MySQL:
...@@ -82,5 +82,5 @@ PHPunit:PHP7.2:MySQL: ...@@ -82,5 +82,5 @@ PHPunit:PHP7.2:MySQL:
services: services:
- mysql:5.6 - mysql:5.6
script: script:
- phpcs - phpcs -n
- phpunit - phpunit
phpcs.xml 0 → 100644
<?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