Skip to content

Instantly share code, notes, and snippets.

@ryanshoover
Created August 21, 2017 18:44
Show Gist options
  • Save ryanshoover/32998679124f9150e617af6c947ed691 to your computer and use it in GitHub Desktop.
Save ryanshoover/32998679124f9150e617af6c947ed691 to your computer and use it in GitHub Desktop.
Plugin Audit
#!/bin/bash
default_path='.'
pluginpath=${1:-$default_path}
declare -a types=("full" "source")
for type in ${types[@]}
do
echo Running PHPCS report: ${type}
phpcs --extensions=php --report=${type} --report-file=report-${type}.txt ${pluginpath}
done;
<?xml version="1.0"?>
<ruleset name="WPEngine">
<description>WP Engine-customized WordPress Coding Standards</description>
<rule ref="PHPCompatibility"/>
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Extra"/>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions">
<!-- From "Extra": The create_function group is excluded as WP core still supports PHP 5.2 and 5.2 does not support anonymous functions. -->
<properties>
<property name="exclude" value="create_function"/>
</properties>
</rule>
<rule ref="Squiz.Commenting">
<!-- Excluding the need for a full stop at the end of a comment (common, harmless error) -->
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
</rule>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment