-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ruleset.xml
36 lines (30 loc) · 1.95 KB
/
ruleset.xml
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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="WPGraphQL Core Coding Standard" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>Coding Standards used by the WPGraphQL core plugin.</description>
<!-- The rules below are the changes from between the original sniff or parent ruleset, and what should be applied for this Standard. -->
<!-- Load WordPress Coding standards -->
<rule ref="WPGraphQL-Strict" >
<!-- This would be a breaking change to fix in Core -->
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
<!-- Most capabilities are referenced via variable -->
<exclude name="WordPress.WP.Capabilities.Undetermined" />
<!-- Most would require breaking changes to fix in core. Tracking: https://github.com/wp-graphql/wp-graphql/issues/2925 -->
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter" />
<!-- Depends on Squiz.Commenting.FunctionComment.MissingParamComment -->
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation" />
<!-- Should probably be added back. -->
<exclude name="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing" />
</rule>
<rule ref="WPGraphQL-Docs" />
<!-- Conflicts with b/c in AbstractConnectionResolver -->
<exclude name="Squiz.Commenting.FunctionComment.InvalidNoReturn" />
<!-- Should probably be added back -->
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
<exclude name="Squiz.Commenting.ClassComment.Missing" />
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.EmptyThrows" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop" />
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
<rule />
</ruleset>