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-03 00:11:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-03 00:11:07 +0300
commiteb1755b2d90efcc161774f66ccd2317ad4c471de (patch)
tree9404125b4bec27588f2a479470e46a27043d94f0 /rubocop
parentbf2439c21308c74e437b872180046b39a61734b5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r--rubocop/cop/graphql/authorize_types.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/rubocop/cop/graphql/authorize_types.rb b/rubocop/cop/graphql/authorize_types.rb
index 1dba719cdff..9bfd93aa3db 100644
--- a/rubocop/cop/graphql/authorize_types.rb
+++ b/rubocop/cop/graphql/authorize_types.rb
@@ -9,7 +9,7 @@ module RuboCop
# We want to exclude our own basetypes and scalars
ALLOWED_TYPES = %w[BaseEnum BaseScalar BasePermissionType MutationType
- QueryType GraphQL::Schema BaseUnion].freeze
+ QueryType GraphQL::Schema BaseUnion BaseInputObject].freeze
def_node_search :authorize?, <<~PATTERN
(send nil? :authorize ...)
@@ -29,8 +29,9 @@ module RuboCop
return false unless class_const
return true if class_const.end_with?('Enum')
+ return true if class_const.end_with?('InputType')
- ALLOWED_TYPES.any? { |allowed| class_node.const_name.include?(allowed) }
+ ALLOWED_TYPES.any? { |allowed| class_const.include?(allowed) }
end
def class_constant(node)