Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Commit 0103b9e

Browse files
Update ruleset.xml
1 parent c73ab37 commit 0103b9e

File tree

1 file changed

+54
-70
lines changed

1 file changed

+54
-70
lines changed

Neuralab/ruleset.xml

Lines changed: 54 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,53 @@
11
<?xml version="1.0"?>
22
<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>
2523
<!-- Exclude other conflicting rules. -->
2624
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned" />
2725
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_trigger_error" />
2826
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
2927
<!-- Yoda, say no to. -->
3028
<exclude name="WordPress.PHP.YodaConditions" />
3129
</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>
5351
<!-- Prefer alignment over line length. -->
5452
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
5553
<properties>
@@ -66,9 +64,7 @@
6664
<rule ref="WordPress.Security.EscapeOutput" />
6765
<rule ref="WordPress.Security.PluginMenuSlug" />
6866
<rule ref="WordPress.Security.PluginMenuSlug.Using__FILE__">
69-
<type>
70-
error
71-
</type>
67+
<type>error</type>
7268
</rule>
7369
<!-- Allow the use of filesystem functions. -->
7470
<rule ref="WordPress.WP.AlternativeFunctions">
@@ -79,47 +75,35 @@
7975
</rule>
8076
<rule ref="WordPress.WP.CronInterval" />
8177
<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>
8880
</rule>
8981
<rule ref="WordPress.WP.PostsPerPage" />
9082
<rule ref="WordPress.WP.PostsPerPage.posts_per_page_numberposts">
91-
<type>
92-
error
93-
</type>
83+
<type>error</type>
9484
</rule>
9585
<rule ref="WordPress.WP.PostsPerPage.posts_per_page_posts_per_page">
96-
<type>
97-
error
98-
</type>
86+
<type>error</type>
9987
</rule>
10088
<rule ref="PEAR.Functions.FunctionCallSignature">
10189
<properties>
102-
<property name="allowMultipleArguments" value="true" />
90+
<property name="allowMultipleArguments" value="true"/>
10391
</properties>
10492
</rule>
10593
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
106-
<severity phpcs-only="true">
107-
0
108-
</severity>
94+
<severity phpcs-only="true">0</severity>
10995
</rule>
11096
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
111-
<severity phpcs-only="true">
112-
0
113-
</severity>
97+
<severity phpcs-only="true">0</severity>
11498
</rule>
11599
<!-- Single statement per line. -->
116100
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
117101
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
118102
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
119103
</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>
125109
</ruleset>

0 commit comments

Comments
 (0)