Created
August 21, 2017 18:44
-
-
Save ryanshoover/32998679124f9150e617af6c947ed691 to your computer and use it in GitHub Desktop.
Plugin Audit
This file contains 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
#!/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; | |
This file contains 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="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