mirror of
https://github.com/mainwp/mainwp-child.git
synced 2025-08-17 20:29:32 +08:00
58 lines
2.2 KiB
XML
58 lines
2.2 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="WordPress Coding Standards">
|
|
<description>MainWP Child dev PHP_CodeSniffer ruleset.</description>
|
|
|
|
<!-- Check all PHP files in directory tree by default. -->
|
|
<file>.</file>
|
|
|
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
|
<exclude-pattern>*/bin/*</exclude-pattern>
|
|
<exclude-pattern>*/.github/*</exclude-pattern>
|
|
<exclude-pattern>*/tests/*</exclude-pattern>
|
|
<exclude-pattern>libs/</exclude-pattern>
|
|
|
|
<arg value="sp" />
|
|
<arg name="extensions" value="php" />
|
|
<arg name="basepath" value="." />
|
|
<arg name="parallel" value="8" />
|
|
|
|
<!-- Configs -->
|
|
<config name="minimum_supported_wp_version" value="5.2" />
|
|
|
|
<!-- Rules -->
|
|
<rule ref="WordPress">
|
|
<exclude name="WordPress.NamingConventions.ValidVariableName" />
|
|
<exclude name="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition" />
|
|
|
|
<!-- Disable Strict comparison in array check. Not applicable in the mojority of cases. -->
|
|
<exclude name="WordPress.PHP.StrictInArray" />
|
|
|
|
<exclude name="WordPress.WP.I18n" />
|
|
|
|
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
|
|
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching" />
|
|
|
|
<exclude name="Universal.ControlStructures.DisallowAlternativeSyntax.FoundIfWithInlineHTML" />
|
|
<exclude name="Universal.ControlStructures.DisallowAlternativeSyntax.FoundForeachWithInlineHTML" />
|
|
<exclude name="Universal.ControlStructures.DisallowAlternativeSyntax.FoundIf" />
|
|
<exclude name="Universal.ControlStructures.IfElseDeclaration.NoNewLine" />
|
|
<exclude name="Universal.Classes.RequireFinalClass.NonFinalClassFound" />
|
|
<exclude name="Universal.Namespaces.EnforceCurlyBraceSyntax.Forbidden" />
|
|
|
|
<exclude name="Generic.Commenting.Todo" />
|
|
<exclude name="Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition" />
|
|
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch" />
|
|
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent" />
|
|
<exclude name="WordPress.WP.CapitalPDangit.Misspelled" />
|
|
</rule>
|
|
|
|
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
|
<properties>
|
|
<property name="indent" value="4"/>
|
|
<property name="tabIndent" value="false"/>
|
|
</properties>
|
|
</rule>
|
|
|
|
<rule ref="Generic.WhiteSpace.DisallowTabIndent" />
|
|
|
|
</ruleset>
|