diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-02 12:09:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-02 12:09:02 +0000 |
commit | b0107e8756bf3287f8a6221252c800209a9c46f6 (patch) | |
tree | f9bd9f37b44a946deaa39fab82085538a5e12105 /rubocop | |
parent | 6aab18704a534ea04f7477146aaa02104e738fcb (diff) | |
download | gitlab-ce-b0107e8756bf3287f8a6221252c800209a9c46f6.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/graphql/authorize_types.rb | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/rubocop/cop/graphql/authorize_types.rb b/rubocop/cop/graphql/authorize_types.rb index 7aaa9299362..c6dbe447b4a 100644 --- a/rubocop/cop/graphql/authorize_types.rb +++ b/rubocop/cop/graphql/authorize_types.rb @@ -7,8 +7,6 @@ module RuboCop MSG = 'Add an `authorize :ability` call to the type: '\ 'https://docs.gitlab.com/ee/development/api_graphql_styleguide.html#type-authorization' - TYPES_DIR = 'app/graphql/types' - # We want to exclude our own basetypes and scalars WHITELISTED_TYPES = %w[BaseEnum BaseScalar BasePermissionType MutationType QueryType GraphQL::Schema BaseUnion].freeze @@ -18,7 +16,6 @@ module RuboCop PATTERN def on_class(node) - return unless in_type?(node) return if whitelisted?(class_constant(node)) return if whitelisted?(superclass_constant(node)) @@ -27,12 +24,6 @@ module RuboCop private - def in_type?(node) - path = node.location.expression.source_buffer.name - - path.include? TYPES_DIR - end - def whitelisted?(class_node) class_const = class_node&.const_name |