|
1 | 1 | <?xml version="1.0"?> |
2 | 2 | <ruleset name="Neuralab"> |
3 | | - <description> |
4 | | - a.neuralab.coding-standard |
5 | | - </description> |
6 | | - <!-- We'll use spaces for indentation! --> |
7 | | - <rule ref="Generic.WhiteSpace.DisallowTabIndent" /> |
8 | | - <rule ref="WordPress-Core"> |
9 | | - <!-- Allow space indent! --> |
10 | | - <exclude name="Generic.WhiteSpace.DisallowSpaceIndent" /> |
11 | | - <!-- We like short arrays. --> |
12 | | - <exclude name="Generic.Arrays.DisallowShortArraySyntax" /> |
13 | | - <rule ref="Generic.Arrays.DisallowLongArraySyntax" /> |
14 | | - <!-- It's fine. --> |
15 | | - <exclude name="Squiz.PHP.EmbeddedPhp.NoSemicolon" /> |
16 | | - <exclude name="WordPress.WhiteSpace.PrecisionAlignment" /> |
17 | | - <exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped" /> |
18 | | - <!-- override tab width --> |
19 | | - <exclude name="WordPress.Arrays.ArrayIndentation" /> |
20 | | - <rule ref="WordPress.Arrays.ArrayIndentation"> |
21 | | - <properties> |
22 | | - <property name="tab-width" value="2" /> |
23 | | - </properties> |
24 | | - </rule> |
| 3 | + <description>a.neuralab.coding-standard</description> |
| 4 | + <!-- We'll use spaces for indentation! --> |
| 5 | + <rule ref="Generic.WhiteSpace.DisallowTabIndent" /> |
| 6 | + <rule ref="WordPress-Core"> |
| 7 | + <!-- Allow space indent! --> |
| 8 | + <exclude name="Generic.WhiteSpace.DisallowSpaceIndent" /> |
| 9 | + <!-- We like short arrays. --> |
| 10 | + <exclude name="Generic.Arrays.DisallowShortArraySyntax" /> |
| 11 | + <rule ref="Generic.Arrays.DisallowLongArraySyntax" /> |
| 12 | + <!-- It's fine. --> |
| 13 | + <exclude name="Squiz.PHP.EmbeddedPhp.NoSemicolon" /> |
| 14 | + <exclude name="WordPress.WhiteSpace.PrecisionAlignment" /> |
| 15 | + <exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped" /> |
| 16 | + <!-- override tab width --> |
| 17 | + <exclude name="WordPress.Arrays.ArrayIndentation"/> |
| 18 | + <rule ref="WordPress.Arrays.ArrayIndentation"> |
| 19 | + <properties> |
| 20 | + <property name="tab-width" value="2"/> |
| 21 | + </properties> |
| 22 | + </rule> |
25 | 23 | <!-- Exclude other conflicting rules. --> |
26 | 24 | <exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned" /> |
27 | 25 | <exclude name="WordPress.PHP.DevelopmentFunctions.error_log_trigger_error" /> |
28 | 26 | <exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" /> |
29 | 27 | <!-- Yoda, say no to. --> |
30 | 28 | <exclude name="WordPress.PHP.YodaConditions" /> |
31 | 29 | </rule> |
32 | | - <rule ref="Generic.WhiteSpace.DisallowTabIndent" /> |
33 | | - <rule ref="PEAR.Functions.FunctionCallSignature"> |
34 | | - <properties> |
35 | | - <property name="indent" value="2" /> |
36 | | - </properties> |
37 | | - </rule> |
38 | | - <!-- Whitespace - indent with 2 spaces, dissalow tabs --> |
39 | | - <rule ref="Generic.WhiteSpace.ScopeIndent"> |
40 | | - <properties> |
41 | | - <property name="indent" value="2" /> |
42 | | - <property name="exact" value="true" /> |
43 | | - <property name="tabIndent" value="false" /> |
44 | | - <property name="ignoreIndentationTokens" type="array" value="T_HEREDOC,T_NOWDOC,T_INLINE_HTML" /> |
45 | | - </properties> |
46 | | - </rule> |
47 | | - <!-- set switch indent to 2 instead of 4 --> |
48 | | - <rule ref="PSR2.ControlStructures.SwitchDeclaration"> |
49 | | - <properties> |
50 | | - <property name="indent" value="2" /> |
51 | | - </properties> |
52 | | - </rule> |
| 30 | + <rule ref="Generic.WhiteSpace.DisallowTabIndent" /> |
| 31 | + <rule ref="PEAR.Functions.FunctionCallSignature"> |
| 32 | + <properties> |
| 33 | + <property name="indent" value="2"/> |
| 34 | + </properties> |
| 35 | + </rule> |
| 36 | + <!-- Whitespace - indent with 2 spaces, dissalow tabs --> |
| 37 | + <rule ref="Generic.WhiteSpace.ScopeIndent"> |
| 38 | + <properties> |
| 39 | + <property name="indent" value="2"/> |
| 40 | + <property name="exact" value="true"/> |
| 41 | + <property name="tabIndent" value="false"/> |
| 42 | + <property name="ignoreIndentationTokens" type="array" value="T_HEREDOC,T_NOWDOC,T_INLINE_HTML"/> |
| 43 | + </properties> |
| 44 | + </rule> |
| 45 | + <!-- set switch indent to 2 instead of 4 --> |
| 46 | + <rule ref="PSR2.ControlStructures.SwitchDeclaration"> |
| 47 | + <properties> |
| 48 | + <property name="indent" value="2"/> |
| 49 | + </properties> |
| 50 | + </rule> |
53 | 51 | <!-- Prefer alignment over line length. --> |
54 | 52 | <rule ref="WordPress.Arrays.MultipleStatementAlignment"> |
55 | 53 | <properties> |
|
66 | 64 | <rule ref="WordPress.Security.EscapeOutput" /> |
67 | 65 | <rule ref="WordPress.Security.PluginMenuSlug" /> |
68 | 66 | <rule ref="WordPress.Security.PluginMenuSlug.Using__FILE__"> |
69 | | - <type> |
70 | | - error |
71 | | - </type> |
| 67 | + <type>error</type> |
72 | 68 | </rule> |
73 | 69 | <!-- Allow the use of filesystem functions. --> |
74 | 70 | <rule ref="WordPress.WP.AlternativeFunctions"> |
|
79 | 75 | </rule> |
80 | 76 | <rule ref="WordPress.WP.CronInterval" /> |
81 | 77 | <rule ref="WordPress.WP.CronInterval.CronSchedulesInterval"> |
82 | | - <type> |
83 | | - error |
84 | | - </type> |
85 | | - <message> |
86 | | - Scheduling crons at %s sec ( less than %s minutes ) is prohibited. |
87 | | - </message> |
| 78 | + <type>error</type> |
| 79 | + <message>Scheduling crons at %s sec ( less than %s minutes ) is prohibited.</message> |
88 | 80 | </rule> |
89 | 81 | <rule ref="WordPress.WP.PostsPerPage" /> |
90 | 82 | <rule ref="WordPress.WP.PostsPerPage.posts_per_page_numberposts"> |
91 | | - <type> |
92 | | - error |
93 | | - </type> |
| 83 | + <type>error</type> |
94 | 84 | </rule> |
95 | 85 | <rule ref="WordPress.WP.PostsPerPage.posts_per_page_posts_per_page"> |
96 | | - <type> |
97 | | - error |
98 | | - </type> |
| 86 | + <type>error</type> |
99 | 87 | </rule> |
100 | 88 | <rule ref="PEAR.Functions.FunctionCallSignature"> |
101 | 89 | <properties> |
102 | | - <property name="allowMultipleArguments" value="true" /> |
| 90 | + <property name="allowMultipleArguments" value="true"/> |
103 | 91 | </properties> |
104 | 92 | </rule> |
105 | 93 | <rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"> |
106 | | - <severity phpcs-only="true"> |
107 | | - 0 |
108 | | - </severity> |
| 94 | + <severity phpcs-only="true">0</severity> |
109 | 95 | </rule> |
110 | 96 | <rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine"> |
111 | | - <severity phpcs-only="true"> |
112 | | - 0 |
113 | | - </severity> |
| 97 | + <severity phpcs-only="true">0</severity> |
114 | 98 | </rule> |
115 | 99 | <!-- Single statement per line. --> |
116 | 100 | <rule ref="Generic.Formatting.DisallowMultipleStatements" /> |
117 | 101 | <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"> |
118 | 102 | <exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" /> |
119 | 103 | </rule> |
120 | | - <rule ref="Generic.Arrays.ArrayIndent"> |
121 | | - <properties> |
122 | | - <property name="indent" value="2" /> |
123 | | - </properties> |
124 | | - </rule> |
| 104 | + <rule ref="Generic.Arrays.ArrayIndent"> |
| 105 | + <properties> |
| 106 | + <property name="indent" value="2"/> |
| 107 | + </properties> |
| 108 | + </rule> |
125 | 109 | </ruleset> |
0 commit comments