Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-30 21:10:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-30 21:10:47 +0300
commit1abf48c10ca3802db57bad00de3355586a6cc40e (patch)
treed027173e342f44e67528b6429c8f4b0b222efec6 /rubocop/cop
parent2cba3ab8e7b2d6b32be6910d15b53860f2c2140e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop/cop')
-rw-r--r--rubocop/cop/graphql/descriptions.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/rubocop/cop/graphql/descriptions.rb b/rubocop/cop/graphql/descriptions.rb
index ec233c65874..520e34dcd16 100644
--- a/rubocop/cop/graphql/descriptions.rb
+++ b/rubocop/cop/graphql/descriptions.rb
@@ -54,6 +54,10 @@ module RuboCop
(send nil? :value ...)
PATTERN
+ def_node_matcher :resolver_kwarg, <<~PATTERN
+ (... (hash <(pair (sym :resolver) $_) ...>))
+ PATTERN
+
def_node_matcher :description_kwarg, <<~PATTERN
(... (hash <(pair (sym :description) $_) ...>))
PATTERN
@@ -64,6 +68,7 @@ module RuboCop
def on_send(node)
return unless graphql_describable?(node)
+ return if resolver_kwarg(node) # Fields may inherit the description from their resolvers.
description = locate_description(node)