-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Comment and expand phpcs config file
- Loading branch information
Showing
1 changed file
with
70 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,73 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Bluehost-Plugin"> | ||
<rule ref="Newfold"/> | ||
<config name="testVersion" value="7.0-"/> | ||
<config name="minimum_supported_wp_version" value="5.0"/> | ||
<exclude-pattern>/assets</exclude-pattern> | ||
<exclude-pattern>/build</exclude-pattern> | ||
<rule ref="WordPress-Core"> | ||
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/> | ||
<exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"/> | ||
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/> | ||
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/> | ||
</rule> | ||
<!-- How to scan? See ./docs/coding-standards.md for instructions. --> | ||
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage --> | ||
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml --> | ||
|
||
<!-- - - - - - - - - - --> | ||
<!-- Files to process --> | ||
<!-- - - - - - - - - - --> | ||
|
||
<!-- What to scan: --> | ||
<file>./bluehost-wordpress-plugin.php</file> <!-- Main plugin file.--> | ||
<file>./inc</file> <!-- The rest of the plugin files. --> | ||
|
||
<!-- What to ignore: --> | ||
<exclude-pattern>./assets</exclude-pattern> | ||
<exclude-pattern>./build</exclude-pattern> | ||
|
||
<!-- - - - - - - - - - --> | ||
<!-- Configuration --> | ||
<!-- - - - - - - - - - --> | ||
|
||
<!-- Show progresss & use colors. --> | ||
<arg value="sp"/> | ||
<arg name="colors"/> | ||
|
||
<!-- Enables parallel processing when available for faster results. --> | ||
<arg name="parallel" value="8"/> | ||
|
||
<!-- Strip the file paths down to the relevant bit and only apply to .php files. --> | ||
<arg name="basepath" value="./"/> | ||
<arg name="extensions" value="php"/> | ||
|
||
<!-- Minimum versions required. --> | ||
<config name="testVersion" value="7.0-"/> | ||
<config name="minimum_supported_wp_version" value="5.0"/> | ||
|
||
<!-- - - - - - - - - - --> | ||
<!-- Rules --> | ||
<!-- - - - - - - - - - --> | ||
|
||
<!-- No PHP syntax errors. --> | ||
<rule ref="Generic.PHP.Syntax"/> | ||
|
||
<!-- See https://github.com/newfold-labs/wp-php-standards for more info. --> | ||
<rule ref="Newfold"/> | ||
|
||
<!-- WordPress Coding Standards that we don't want to enforce. --> | ||
<rule ref="WordPress-Core"> | ||
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/> | ||
<exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"/> | ||
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/> | ||
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/> | ||
</rule> | ||
|
||
<!-- Make sure our text is localized with the correct text domain. --> | ||
<rule ref="WordPress.WP.I18n"> | ||
<properties> | ||
<property name="text_domain" type="array" value="wp-plugin-bluehost" /> | ||
</properties> | ||
</rule> | ||
|
||
<!-- Commenting standards. --> | ||
<rule ref="Generic.Commenting.Todo.CommentFound"> | ||
<message>Please review this TODO comment: %s</message> | ||
<severity>3</severity> | ||
</rule> | ||
|
||
<!-- Gotta end those inline comments with a period. --> | ||
<rule ref="Squiz.Commenting.InlineComment.InvalidEndChar"> | ||
<type>warning</type> | ||
</rule> | ||
</ruleset> |