| @@ -1,66 +1,27 @@ | ||
| 1 | 1 | <?xml version="1.0"?> |
| 2 | -<ruleset name="IconicWP-Default"> | |
| 3 | - <description>Generally-applicable sniffs for Iconic plugins</description> | |
| 2 | +<ruleset name="WooCommerce Coding Standards"> | |
| 3 | + <description>Generally-applicable sniffs for WooCommerce plugins</description> | |
| 4 | 4 | |
| 5 | - <!-- | |
| 6 | - Prevent errors caused by WordPress Coding Standards not supporting PHP 8.0+. | |
| 7 | - See https://github.com/WordPress/WordPress-Coding-Standards/issues/2035 | |
| 8 | - --> | |
| 9 | - <ini name="error_reporting" value="E_ALL & ~E_DEPRECATED" /> | |
| 10 | - | |
| 11 | 5 | <!-- Configs --> |
| 12 | - <config name="minimum_supported_wp_version" value="5.2"/> | |
| 13 | - <config name="testVersion" value="7.2-"/> | |
| 6 | + <config name="minimum_supported_wp_version" value="4.7"/> | |
| 7 | + <config name="testVersion" value="5.6-"/> | |
| 14 | 8 | |
| 15 | - <!-- Excludes --> | |
| 16 | - <exclude-pattern>*/dist/*</exclude-pattern> | |
| 17 | - <exclude-pattern>*/languages/*</exclude-pattern> | |
| 18 | - <exclude-pattern>*/.github/*</exclude-pattern> | |
| 19 | - <exclude-pattern>*/wp-admin/*</exclude-pattern> | |
| 20 | - <exclude-pattern>*/wp-includes/*</exclude-pattern> | |
| 21 | - <exclude-pattern>*/wp-config.php</exclude-pattern> | |
| 22 | - <exclude-pattern>*/functions.php</exclude-pattern> | |
| 23 | - <exclude-pattern>*/*.asset.php</exclude-pattern> | |
| 24 | - <exclude-pattern>*/stubs/*</exclude-pattern> | |
| 25 | - | |
| 26 | - <!-- Third-party code --> | |
| 27 | - <exclude-pattern>*/node_modules/*</exclude-pattern> | |
| 28 | - <exclude-pattern>*/vendor/*</exclude-pattern> | |
| 29 | - <exclude-pattern>*/vendor-prefixed/*</exclude-pattern> | |
| 30 | - | |
| 31 | - <!-- Ensure certain file types aren't sniffed --> | |
| 32 | - <exclude-pattern>*\.(css|js)</exclude-pattern> | |
| 33 | - | |
| 34 | - <!-- Rules --> | |
| 9 | + <!-- Rules --> | |
| 35 | 10 | <rule ref="WordPress"> |
| 36 | 11 | <exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/> |
| 37 | 12 | <exclude name="WordPress.Files.FileName.InvalidClassFileName"/> |
| 38 | 13 | </rule> |
| 39 | 14 | |
| 40 | - <rule ref="WordPress-Core"> | |
| 41 | - <exclude name="Generic.Arrays.DisallowShortArraySyntax"/> | |
| 42 | - <exclude name="WordPress.PHP.YodaConditions"/> | |
| 43 | - </rule> | |
| 15 | + <rule ref="vendor/woocommerce/woocommerce-sniffs/src/WooCommerce-Core/ruleset.xml"/> | |
| 16 | + <rule ref="PHPCompatibility"/> | |
| 44 | 17 | |
| 45 | - <rule ref="WooCommerce-Core" /> | |
| 46 | - <rule ref="PHPCompatibilityWP"/> | |
| 18 | + <!-- Args --> | |
| 19 | + <arg name="extensions" value="php"/> | |
| 20 | + <arg value="s"/> | |
| 47 | 21 | |
| 48 | - <rule ref="WordPress.WP.PostsPerPage"> | |
| 49 | - <properties> | |
| 50 | - <property name="posts_per_page" value="200"/> | |
| 51 | - </properties> | |
| 52 | - </rule> | |
| 53 | - | |
| 54 | - <rule ref="WordPress-Extra"> | |
| 55 | - <!-- Don't require punctuation after inline comments --> | |
| 56 | - <exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/> | |
| 57 | - | |
| 58 | - <!-- Comment punctuation doesn't matter --> | |
| 59 | - <exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/> | |
| 60 | - <exclude name="Squiz.Commenting.FunctionComment.ThrowsNoFullStop"/> | |
| 61 | - </rule> | |
| 62 | - | |
| 63 | - <rule ref="PHPCompatibilityWP"> | |
| 64 | - <include-pattern>*\.php$</include-pattern> | |
| 65 | - </rule> | |
| 22 | + <!-- Excludes --> | |
| 23 | + <exclude-pattern>*/dev-lib/*</exclude-pattern> | |
| 24 | + <exclude-pattern>*/node_modules/*</exclude-pattern> | |
| 25 | + <exclude-pattern>*/vendor/*</exclude-pattern> | |
| 26 | + <exclude-pattern>.github/</exclude-pattern> | |
| 66 | 27 | </ruleset> |