-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathruleset.xml
More file actions
62 lines (53 loc) · 2.44 KB
/
ruleset.xml
File metadata and controls
62 lines (53 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?xml version="1.0"?>
<ruleset
name="WPGraphQL Strict Coding Standard"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd"
>
<description>Best practices beyond the WPGraphQL core standards</description>
<rule ref="WPGraphQL-Strict" />
<!-- The rules below are the changes from between the original sniff or parent ruleset, and what should be applied for this Standard. -->
<!-- Limit max. consecutive blank lines to 1 instead of 2. -->
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1" />
<property name="spacingBeforeFirst" value="0" />
<property name="spacingAfterLast" value="0" />
</properties>
</rule>
<!-- These formatting rules are suppressed in VIP-GO and restored here.-->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<severity>5</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
<severity>5</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
<severity>5</severity>
</rule>
<!-- The following Slevomat rules enforce code formatting standards.-->
<rule ref="SlevomatCodingStandard.Classes.BackedEnumTypeSpacing" />
<rule ref="SlevomatCodingStandard.Classes.ClassMemberSpacing" />
<rule ref="SlevomatCodingStandard.Classes.ConstantSpacing" />
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
<properties>
<property name="linesCountAfterOpeningBrace" value="0" />
<property name="linesCountBeforeClosingBrace" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.EnumCaseSpacing" />
<rule ref="SlevomatCodingStandard.Classes.MethodSpacing" />
<rule ref="SlevomatCodingStandard.Classes.ParentCallSpacing" />
<rule ref="SlevomatCodingStandard.Classes.PropertyDeclaration" />
<rule ref="SlevomatCodingStandard.Classes.PropertySpacing" />
<rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration" />
<rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing">
<properties>
<property name="linesCountBeforeFirstUseWhenFirstInClass" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator" />
<rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration" />
<rule ref="SlevomatCodingStandard.Functions.DisallowEmptyFunction" />
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon" />
</ruleset>