|
1 | 1 | <?xml version="1.0"?>
|
2 |
| -<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Example Project" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/master/phpcs.xsd"> |
| 2 | +<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Viget Blocks Toolkit" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/master/phpcs.xsd"> |
3 | 3 |
|
4 | 4 | <description>A custom set of rules to check for a WPized WordPress project</description>
|
5 | 5 |
|
|
42 | 42 | #############################################################################
|
43 | 43 | -->
|
44 | 44 |
|
| 45 | + <rule ref="WordPress"> |
| 46 | + <exclude name="Generic.Arrays.DisallowShortArraySyntax"/> |
| 47 | + <exclude name="Universal.Arrays.DisallowShortArraySyntax"/> |
| 48 | + </rule> |
| 49 | + |
45 | 50 | <!-- Include the WordPress-Extra standard. -->
|
46 | 51 | <rule ref="WordPress-Extra">
|
47 |
| - <!-- |
48 |
| - We may want a middle ground though. The best way to do this is add the |
49 |
| - entire ruleset, then rule by rule, remove ones that don't suit a project. |
50 |
| - We can do this by running `phpcs` with the '-s' flag, which allows us to |
51 |
| - see the names of the sniffs reporting errors. |
52 |
| - Once we know the sniff names, we can opt to exclude sniffs which don't |
53 |
| - suit our project like so. |
54 |
| -
|
55 |
| - The below two examples just show how you can exclude rules/error codes. |
56 |
| - They are not intended as advice about which sniffs to exclude. |
57 |
| - --> |
58 |
| - |
59 |
| - <!-- |
60 |
| - <exclude name="WordPress.WhiteSpace.ControlStructureSpacing"/> |
61 |
| - <exclude name="Modernize.FunctionCalls.Dirname.Nested"/> |
62 |
| - --> |
| 52 | + <exclude name="Generic.Arrays.DisallowShortArraySyntax"/> |
| 53 | + <exclude name="Universal.Arrays.DisallowShortArraySyntax"/> |
63 | 54 | </rule>
|
64 | 55 |
|
65 | 56 | <!-- Let's also check that everything is properly documented. -->
|
|
105 | 96 | <rule ref="WordPress.WP.I18n">
|
106 | 97 | <properties>
|
107 | 98 | <property name="text_domain" type="array">
|
108 |
| - <element value="wp-starter"/> |
109 |
| - <element value="library-wp-starter"/> |
| 99 | + <element value="viget-blocks-toolkit"/> |
110 | 100 | </property>
|
111 | 101 | </properties>
|
112 | 102 | </rule>
|
113 | 103 |
|
114 | 104 | <rule ref="WordPress.NamingConventions.PrefixAllGlobals">
|
115 | 105 | <properties>
|
116 | 106 | <property name="prefixes" type="array">
|
117 |
| - <element value="wpstarter_"/> |
| 107 | + <element value="VGTBT_"/> |
| 108 | + <element value="vgtbt_"/> |
| 109 | + <element value="VigetBlocksToolkit"/> |
118 | 110 | </property>
|
119 | 111 | </properties>
|
120 | 112 | </rule>
|
|
0 commit comments