From e101a26444f0f02df2c6301f13bc1f3e20781f8b Mon Sep 17 00:00:00 2001 From: Peter Leitzen Date: Mon, 26 Aug 2019 12:24:25 +0000 Subject: Utilize RuboCop's Include/Exclude config Stop checking the file location programmatically. --- rubocop/cop/graphql/authorize_types.rb | 6 ------ 1 file changed, 6 deletions(-) (limited to 'rubocop/cop/graphql') 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) -- cgit v1.2.3