Skip to content

Commit f96a817

Browse files
committed
dev: update Core/Strict ruleselts for WPCS v3
see: wp-graphql/wp-graphql#2924
1 parent 30cf5e4 commit f96a817

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

WPGraphQL-Core/ruleset.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66

77
<!-- Load WordPress Coding standards -->
88
<rule ref="WPGraphQL-Strict" >
9-
<!-- This would be a breaking change to fix in Core -->
10-
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
119
<!-- Conflicts with b/c in AbstractConnectionResolver -->
1210
<exclude name="Squiz.Commenting.FunctionComment.InvalidNoReturn" />
11+
<!-- This would be a breaking change to fix in Core -->
12+
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
13+
<!-- Most capabilities are referenced via variable -->
14+
<exclude name="WordPress.WP.Capabilities.Undetermined" />
15+
<!-- Needs core decision: https://github.com/wp-graphql/wp-graphql/pull/2924/files#r1317187370 -->
16+
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter" />
1317
</rule>
1418

1519
</ruleset>

WPGraphQL-Strict/ruleset.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
</properties>
1414
</rule>
1515

16+
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
17+
<severity>5</severity>
18+
</rule>
1619
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
1720
<severity>5</severity>
1821
</rule>
@@ -25,6 +28,9 @@
2528
<rule ref="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid">
2629
<severity>5</severity>
2730
</rule>
31+
<rule ref="WordPress.WP.Capabilities.Undetermined">
32+
<severity>5</severity>
33+
</rule>
2834

2935
<!-- Additional commenting sniffs are in WPGraphQL-Docs -->
3036
<rule ref="Squiz.Commenting.FunctionComment">

0 commit comments

Comments
 (0)