58 lines
2.5 KiB
XML
58 lines
2.5 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="AR/WP/Plugin ruleset">
|
|
|
|
<description>Custom ruleset for AR/WP/Plugins</description>
|
|
|
|
<!-- Show progress in all reports. -->
|
|
<arg value="p"/>
|
|
|
|
<!-- A path to strip from the front of file paths inside reports. -->
|
|
<arg name="basepath" value="."/>
|
|
<arg name="colors"/>
|
|
<arg name="extensions" value="php"/>
|
|
|
|
<!-- Exclude the Composer Vendor directory. -->
|
|
<exclude-pattern>/vendor/*</exclude-pattern>
|
|
|
|
<!-- Exclude the Node Modules directory. -->
|
|
<exclude-pattern>/node_modules/*</exclude-pattern>
|
|
|
|
<!-- Set minimum supported WordPress version -->
|
|
<config name="minimum_supported_wp_version" value="5.3"/>
|
|
|
|
<!-- Check for PHP cross-version compatibility. -->
|
|
<config name="testVersion" value="5.6-"/>
|
|
<rule ref="PHPCompatibilityWP"/>
|
|
|
|
<!-- Include the WordPress standard. -->
|
|
<rule ref="WordPress-Extra">
|
|
<!-- Use PSR-4 file naming standard instead -->
|
|
<exclude name="WordPress.Files.FileName"/>
|
|
<!-- Allow short array syntax -->
|
|
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
|
|
<!-- Allow global variable override -->
|
|
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited"/>
|
|
<!-- Temporarily exclude rules -->
|
|
<!-- ** Audit-usage ** -->
|
|
<exclude name="Squiz.PHP.Eval.Discouraged"/>
|
|
<exclude name="Squiz.Scope.MethodScope.Missing"/>
|
|
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/>
|
|
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
|
|
<exclude name="PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.Changed"/>
|
|
<exclude name="PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection"/>
|
|
<exclude name="WordPress.Security.NonceVerification.Missing"/>
|
|
<exclude name="WordPress.Security.NonceVerification.Recommended"/>
|
|
|
|
<!-- ** WordPress-Specific ** -->
|
|
<exclude name="WordPress.DB.PreparedSQL.InterpolatedNotPrepared"/>
|
|
<exclude name="WordPress.DB.PreparedSQL.NotPrepared"/>
|
|
<exclude name="WordPress.PHP.DontExtract.extract_extract"/>
|
|
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped"/>
|
|
</rule>
|
|
|
|
<!-- Add in some extra rules from other standards. -->
|
|
<!-- <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/> -->
|
|
<!-- <rule ref="Generic.Commenting.Todo"/> -->
|
|
<rule ref="Squiz.Commenting.FunctionComment.SpacingAfter"/>
|
|
|
|
</ruleset> |