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:
authorPeter Leitzen <pleitzen@gitlab.com>2019-08-26 15:24:25 +0300
committerSean McGivern <sean@gitlab.com>2019-08-26 15:24:25 +0300
commite101a26444f0f02df2c6301f13bc1f3e20781f8b (patch)
treed745ac1b2f29ae5eb656c5b597e00343d645c5d4 /rubocop/cop/graphql
parent9e48f7079b648e427d24083af19c3f670cda3206 (diff)
Utilize RuboCop's Include/Exclude config
Stop checking the file location programmatically.
Diffstat (limited to 'rubocop/cop/graphql')
-rw-r--r--rubocop/cop/graphql/authorize_types.rb6
1 files changed, 0 insertions, 6 deletions
diff --git a/rubocop/cop/graphql/authorize_types.rb b/rubocop/cop/graphql/authorize_types.rb
index 93fe80c3edf..cd8bdbaee59 100644
--- a/rubocop/cop/graphql/authorize_types.rb
+++ b/rubocop/cop/graphql/authorize_types.rb
@@ -1,13 +1,9 @@
# frozen_string_literal: true
-require_relative '../../spec_helpers'
-
module RuboCop
module Cop
module Graphql
class AuthorizeTypes < RuboCop::Cop::Cop
- include SpecHelpers
-
MSG = 'Add an `authorize :ability` call to the type: '\
'https://docs.gitlab.com/ee/development/api_graphql_styleguide.html#type-authorization'
@@ -32,8 +28,6 @@ module RuboCop
private
def in_type?(node)
- return if in_spec?(node)
-
path = node.location.expression.source_buffer.name
path.include?(TYPES_DIR)