diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-13 16:26:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-13 16:26:31 +0300 |
commit | b7dfe2ae4054aa40e15182fd3c6cb7dd39f131db (patch) | |
tree | 5ab080ca9cadeb6cd9578bf301e4e9e8810bed9e /rubocop/cop/graphql/authorize_types.rb | |
parent | 25cb337cf12438169f1b14bc5dace8a06a7356e3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop/cop/graphql/authorize_types.rb')
-rw-r--r-- | rubocop/cop/graphql/authorize_types.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rubocop/cop/graphql/authorize_types.rb b/rubocop/cop/graphql/authorize_types.rb index cd8bdbaee59..c69ce10f1c5 100644 --- a/rubocop/cop/graphql/authorize_types.rb +++ b/rubocop/cop/graphql/authorize_types.rb @@ -30,7 +30,7 @@ module RuboCop def in_type?(node) path = node.location.expression.source_buffer.name - path.include?(TYPES_DIR) + path.include? TYPES_DIR end def whitelisted?(class_node) @@ -44,7 +44,7 @@ module RuboCop end def superclass_constant(class_node) - # First one is the class name itself, second is it's superclass + # First one is the class name itself, second is its superclass _class_constant, *others = class_node.descendants others.find { |node| node.const_type? && node&.const_name != 'Types' } |