ocean-extra
Last commit date
assets
1 year ago
includes
2 months ago
languages
2 months ago
sass
2 years ago
changelog.txt
2 months ago
index.php
9 years ago
ocean-extra.php
2 months ago
phpcs.xml.dist
3 years ago
readme.txt
2 months ago
wpml-config.xml
4 years ago
phpcs.xml.dist
54 lines
| 1 | <?xml version="1.0"?> |
| 2 | <ruleset name="OceanExtra"> |
| 3 | <description>Rules for Ocean Extra</description> |
| 4 | |
| 5 | <arg name="extensions" value="php" /> |
| 6 | |
| 7 | <exclude-pattern>*/vendor/*</exclude-pattern> |
| 8 | <exclude-pattern>*/node_modules/*</exclude-pattern> |
| 9 | <exclude-pattern>*/sass*/*</exclude-pattern> |
| 10 | <exclude-pattern>*/build*/*</exclude-pattern> |
| 11 | <exclude-pattern>*/assets*/*</exclude-pattern> |
| 12 | |
| 13 | <!-- Include the WordPress-Extra standard. --> |
| 14 | <rule ref="WordPress-Extra"> |
| 15 | <!-- |
| 16 | We may want a middle ground though. The best way to do this is add the |
| 17 | entire ruleset, then rule by rule, remove ones that don't suit a project. |
| 18 | We can do this by running `phpcs` with the '-s' flag, which allows us to |
| 19 | see the names of the sniffs reporting errors. |
| 20 | Once we know the sniff names, we can opt to exclude sniffs which don't |
| 21 | suit our project like so. |
| 22 | --> |
| 23 | <exclude name="WordPress.Files.FileName.InvalidClassFileName"/> |
| 24 | <exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/> |
| 25 | <exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"/> |
| 26 | <exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned"/> |
| 27 | <exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/> |
| 28 | <exclude name="Generic.Files.LineEndings" /> |
| 29 | <exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" /> |
| 30 | <exclude name="Generic.Arrays.DisallowShortArraySyntax"/> |
| 31 | </rule> |
| 32 | |
| 33 | <!-- Let's also check that everything is properly documented. --> |
| 34 | <rule ref="WordPress-Docs"/> |
| 35 | <rule ref="PHPCompatibility"/> |
| 36 | |
| 37 | <config name="minimum_supported_wp_version" value="5.0.0"/> |
| 38 | <config name="testVersion" value="5.6-"/> |
| 39 | |
| 40 | <rule ref="WordPress.WP.I18n"> |
| 41 | <properties> |
| 42 | <property name="text_domain" value="ocean-extra"/> |
| 43 | </properties> |
| 44 | </rule> |
| 45 | |
| 46 | <rule ref="WordPress.NamingConventions.PrefixAllGlobals"> |
| 47 | <properties> |
| 48 | <property name="prefixes" type="array"> |
| 49 | <element value="oe"/> |
| 50 | </property> |
| 51 | </properties> |
| 52 | </rule> |
| 53 | |
| 54 | </ruleset> |