|
1 | 1 | <?xml version="1.0"?> |
2 | 2 | <ruleset name="Neuralab"> |
3 | 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> |
23 | | - <!-- Exclude other conflicting rules. --> |
24 | | - <exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned" /> |
25 | | - <exclude name="WordPress.PHP.DevelopmentFunctions.error_log_trigger_error" /> |
26 | | - <exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" /> |
27 | | - <!-- Yoda, say no to. --> |
28 | | - <exclude name="WordPress.PHP.YodaConditions" /> |
29 | | - </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> |
51 | | - <!-- Prefer alignment over line length. --> |
52 | | - <rule ref="WordPress.Arrays.MultipleStatementAlignment"> |
53 | | - <properties> |
54 | | - <property name="maxColumn" value="1000" /> |
55 | | - </properties> |
56 | | - </rule> |
57 | | - <rule ref="WordPress.DB.SlowDBQuery" /> |
58 | | - <!-- Allow . in hook names. --> |
59 | | - <rule ref="WordPress.NamingConventions.ValidHookName"> |
60 | | - <properties> |
61 | | - <property name="additionalWordDelimiters" value="." /> |
62 | | - </properties> |
63 | | - </rule> |
64 | | - <rule ref="WordPress.Security.EscapeOutput" /> |
65 | | - <rule ref="WordPress.Security.PluginMenuSlug" /> |
66 | | - <rule ref="WordPress.Security.PluginMenuSlug.Using__FILE__"> |
67 | | - <type>error</type> |
68 | | - </rule> |
69 | | - <!-- Allow the use of filesystem functions. --> |
70 | | - <rule ref="WordPress.WP.AlternativeFunctions"> |
71 | | - <properties> |
72 | | - <property name="exclude" value="file_get_contents,file_system_read" /> |
73 | | - <property name="exclude" value="json_encode,json_decode" /> |
74 | | - </properties> |
75 | | - </rule> |
76 | | - <rule ref="WordPress.WP.CronInterval" /> |
77 | | - <rule ref="WordPress.WP.CronInterval.CronSchedulesInterval"> |
78 | | - <type>error</type> |
79 | | - <message>Scheduling crons at %s sec ( less than %s minutes ) is prohibited.</message> |
80 | | - </rule> |
81 | | - <rule ref="WordPress.WP.PostsPerPage" /> |
82 | | - <rule ref="WordPress.WP.PostsPerPage.posts_per_page_numberposts"> |
83 | | - <type>error</type> |
84 | | - </rule> |
85 | | - <rule ref="WordPress.WP.PostsPerPage.posts_per_page_posts_per_page"> |
86 | | - <type>error</type> |
87 | | - </rule> |
88 | | - <rule ref="PEAR.Functions.FunctionCallSignature"> |
89 | | - <properties> |
90 | | - <property name="allowMultipleArguments" value="true"/> |
91 | | - </properties> |
92 | | - </rule> |
93 | | - <rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"> |
94 | | - <severity phpcs-only="true">0</severity> |
95 | | - </rule> |
96 | | - <rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine"> |
97 | | - <severity phpcs-only="true">0</severity> |
98 | | - </rule> |
99 | | - <!-- Single statement per line. --> |
100 | | - <rule ref="Generic.Formatting.DisallowMultipleStatements" /> |
101 | | - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"> |
102 | | - <exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" /> |
103 | | - </rule> |
104 | | - <rule ref="Generic.Arrays.ArrayIndent"> |
105 | | - <properties> |
106 | | - <property name="indent" value="2"/> |
107 | | - </properties> |
108 | | - </rule> |
109 | | - <rule ref="Generic.Arrays.DisallowLongArraySyntax" /> |
| 4 | + |
| 5 | + <rule ref="Neuralab-Empty"/> |
| 6 | + <rule ref="WordPress-Core" /> |
| 7 | + <rule ref="WordPress-Docs"> |
| 8 | + <!-- Don't force file comments --> |
| 9 | + <exclude name="Squiz.Commenting.FileComment"/> |
| 10 | + <!-- Allow embedded php without semicolon --> |
| 11 | + <exclude name="Squiz.PHP.EmbeddedPhp.NoSemicolon"/> |
| 12 | + </rule> |
| 13 | + <rule ref="WordPress-Extra"/> |
| 14 | + |
110 | 15 | </ruleset> |
0 commit comments