diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-25 12:06:13 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-25 12:06:13 +0000 |
commit | 8f1f6b374b69fd6356bdc5561d56f5ca9db9fadd (patch) | |
tree | 9b81a74772b269cf3d851ed2d29f97c31985b98a /rubocop | |
parent | dbd50b6e203994cdb393494faa8fc1b2fb406487 (diff) | |
download | gitlab-ce-8f1f6b374b69fd6356bdc5561d56f5ca9db9fadd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/graphql/authorize_types.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rubocop/cop/graphql/authorize_types.rb b/rubocop/cop/graphql/authorize_types.rb index c69ce10f1c5..7aaa9299362 100644 --- a/rubocop/cop/graphql/authorize_types.rb +++ b/rubocop/cop/graphql/authorize_types.rb @@ -34,7 +34,10 @@ module RuboCop end def whitelisted?(class_node) - return false unless class_node&.const_name + class_const = class_node&.const_name + + return false unless class_const + return true if class_const.end_with?('Enum') WHITELISTED_TYPES.any? { |whitelisted| class_node.const_name.include?(whitelisted) } end |