Commit b56ae4df authored by charlieablett's avatar charlieablett Committed by Jan Provaznik

Add EE offense tags

These can be fixed one by one, and until then, they are all
tagged to be ignored so we can backfill the descriptions in time.
parent e5f98f8e
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-09-06 13:54:58 +1200 using RuboCop version 0.69.0.
# on 2019-05-04 16:01:00 +0000 using RuboCop version 0.68.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
......@@ -878,7 +878,3 @@ Style/UnneededSort:
Exclude:
- 'app/models/concerns/resolvable_discussion.rb'
- 'lib/gitlab/highlight.rb'
# Offense count: 197
Graphql/Descriptions:
Enabled: false
......@@ -7,17 +7,17 @@ module EE
prepended do
%i[epics].each do |feature|
field "#{feature}_enabled", GraphQL::BOOLEAN_TYPE, null: true, resolve: -> (group, args, ctx) do
field "#{feature}_enabled", GraphQL::BOOLEAN_TYPE, null: true, resolve: -> (group, args, ctx) do # rubocop:disable Graphql/Descriptions
group.feature_available?(feature)
end
end
field :epic,
field :epic, # rubocop:disable Graphql/Descriptions
::Types::EpicType,
null: true,
resolver: ::Resolvers::EpicResolver.single
field :epics,
field :epics, # rubocop:disable Graphql/Descriptions
::Types::EpicType.connection_type,
null: true,
resolver: ::Resolvers::EpicResolver
......
......@@ -6,15 +6,15 @@ module EE
extend ActiveSupport::Concern
prepended do
field :weight, GraphQL::INT_TYPE,
field :weight, GraphQL::INT_TYPE, # rubocop:disable Graphql/Descriptions
null: true,
resolve: -> (obj, _args, _ctx) { obj.supports_weight? ? obj.weight : nil }
field :designs, ::Types::DesignManagement::DesignCollectionType,
field :designs, ::Types::DesignManagement::DesignCollectionType, # rubocop:disable Graphql/Descriptions
null: true, method: :design_collection,
deprecation_reason: 'use design_collection'
field :design_collection, ::Types::DesignManagement::DesignCollectionType, null: true
field :design_collection, ::Types::DesignManagement::DesignCollectionType, null: true # rubocop:disable Graphql/Descriptions
end
end
end
......
......@@ -7,8 +7,8 @@ module Types
authorize :read_design
field :project, Types::ProjectType, null: false
field :issue, Types::IssueType, null: false
field :project, Types::ProjectType, null: false # rubocop:disable Graphql/Descriptions
field :issue, Types::IssueType, null: false # rubocop:disable Graphql/Descriptions
field :designs,
Types::DesignManagement::DesignType.connection_type,
null: false,
......
......@@ -11,23 +11,23 @@ module Types
alias_method :design, :object
field :id, GraphQL::ID_TYPE, null: false
field :project, Types::ProjectType, null: false
field :issue, Types::IssueType, null: false
field :id, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :project, Types::ProjectType, null: false # rubocop:disable Graphql/Descriptions
field :issue, Types::IssueType, null: false # rubocop:disable Graphql/Descriptions
field :notes_count,
GraphQL::INT_TYPE,
null: false,
method: :user_notes_count,
description: 'The total count of user-created notes for this design'
field :filename, GraphQL::STRING_TYPE, null: false
field :full_path, GraphQL::STRING_TYPE, null: false
field :filename, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :full_path, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :event,
Types::DesignManagement::DesignVersionEventEnum,
null: false,
description: 'The change that happened to the design at this version',
extras: [:parent]
field :image, GraphQL::STRING_TYPE, null: false, extras: [:parent]
field :diff_refs, Types::DiffRefsType, null: false, calls_gitaly: true
field :image, GraphQL::STRING_TYPE, null: false, extras: [:parent] # rubocop:disable Graphql/Descriptions
field :diff_refs, Types::DiffRefsType, null: false, calls_gitaly: true # rubocop:disable Graphql/Descriptions
field :versions,
Types::DesignManagement::VersionType.connection_type,
resolver: Resolvers::DesignManagement::VersionResolver,
......
......@@ -9,8 +9,8 @@ module Types
authorize :read_design
field :id, GraphQL::ID_TYPE, null: false
field :sha, GraphQL::ID_TYPE, null: false
field :id, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :sha, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :designs,
Types::DesignManagement::DesignType.connection_type,
null: false,
......
......@@ -8,9 +8,9 @@ module Types
present_using EpicIssuePresenter
field :epic_issue_id, GraphQL::ID_TYPE, null: false
field :epic_issue_id, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :relation_path, GraphQL::STRING_TYPE, null: true, resolve: -> (issue, args, ctx) do
field :relation_path, GraphQL::STRING_TYPE, null: true, resolve: -> (issue, args, ctx) do # rubocop:disable Graphql/Descriptions
issue.group_epic_issue_path(ctx[:current_user])
end
# rubocop: enable Graphql/AuthorizeTypes
......
......@@ -12,52 +12,52 @@ module Types
implements(Types::Notes::NoteableType)
field :id, GraphQL::ID_TYPE, null: false
field :iid, GraphQL::ID_TYPE, null: false
field :title, GraphQL::STRING_TYPE, null: true
field :description, GraphQL::STRING_TYPE, null: true
field :state, EpicStateEnum, null: false
field :id, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :iid, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :title, GraphQL::STRING_TYPE, null: true # rubocop:disable Graphql/Descriptions
field :description, GraphQL::STRING_TYPE, null: true # rubocop:disable Graphql/Descriptions
field :state, EpicStateEnum, null: false # rubocop:disable Graphql/Descriptions
field :group, GroupType,
field :group, GroupType, # rubocop:disable Graphql/Descriptions
null: false,
resolve: -> (obj, _args, _ctx) { Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, obj.group_id).find }
field :parent, EpicType,
field :parent, EpicType, # rubocop:disable Graphql/Descriptions
null: true,
resolve: -> (obj, _args, _ctx) { Gitlab::Graphql::Loaders::BatchModelLoader.new(Epic, obj.parent_id).find }
field :author, Types::UserType,
field :author, Types::UserType, # rubocop:disable Graphql/Descriptions
null: false,
resolve: -> (obj, _args, _ctx) { Gitlab::Graphql::Loaders::BatchModelLoader.new(User, obj.author_id).find }
field :start_date, Types::TimeType, null: true
field :start_date_is_fixed, GraphQL::BOOLEAN_TYPE, null: true, method: :start_date_is_fixed?, authorize: :admin_epic
field :start_date_fixed, Types::TimeType, null: true, authorize: :admin_epic
field :start_date_from_milestones, Types::TimeType, null: true, authorize: :admin_epic
field :start_date, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions
field :start_date_is_fixed, GraphQL::BOOLEAN_TYPE, null: true, method: :start_date_is_fixed?, authorize: :admin_epic # rubocop:disable Graphql/Descriptions
field :start_date_fixed, Types::TimeType, null: true, authorize: :admin_epic # rubocop:disable Graphql/Descriptions
field :start_date_from_milestones, Types::TimeType, null: true, authorize: :admin_epic # rubocop:disable Graphql/Descriptions
field :due_date, Types::TimeType, null: true
field :due_date_is_fixed, GraphQL::BOOLEAN_TYPE, null: true, method: :due_date_is_fixed?, authorize: :admin_epic
field :due_date_fixed, Types::TimeType, null: true, authorize: :admin_epic
field :due_date_from_milestones, Types::TimeType, null: true, authorize: :admin_epic
field :due_date, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions
field :due_date_is_fixed, GraphQL::BOOLEAN_TYPE, null: true, method: :due_date_is_fixed?, authorize: :admin_epic # rubocop:disable Graphql/Descriptions
field :due_date_fixed, Types::TimeType, null: true, authorize: :admin_epic # rubocop:disable Graphql/Descriptions
field :due_date_from_milestones, Types::TimeType, null: true, authorize: :admin_epic # rubocop:disable Graphql/Descriptions
field :closed_at, Types::TimeType, null: true
field :created_at, Types::TimeType, null: true
field :updated_at, Types::TimeType, null: true
field :closed_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions
field :created_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions
field :updated_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions
field :children,
field :children, # rubocop:disable Graphql/Descriptions
::Types::EpicType.connection_type,
null: true,
resolver: ::Resolvers::EpicResolver
field :has_children, GraphQL::BOOLEAN_TYPE, null: false, method: :has_children?
field :has_issues, GraphQL::BOOLEAN_TYPE, null: false, method: :has_issues?
field :has_children, GraphQL::BOOLEAN_TYPE, null: false, method: :has_children? # rubocop:disable Graphql/Descriptions
field :has_issues, GraphQL::BOOLEAN_TYPE, null: false, method: :has_issues? # rubocop:disable Graphql/Descriptions
field :web_path, GraphQL::STRING_TYPE, null: false, method: :group_epic_path
field :web_url, GraphQL::STRING_TYPE, null: false, method: :group_epic_url
field :relation_path, GraphQL::STRING_TYPE, null: true, method: :group_epic_link_path
field :reference, GraphQL::STRING_TYPE, null: false, method: :epic_reference do
argument :full, GraphQL::BOOLEAN_TYPE, required: false, default_value: false
field :web_path, GraphQL::STRING_TYPE, null: false, method: :group_epic_path # rubocop:disable Graphql/Descriptions
field :web_url, GraphQL::STRING_TYPE, null: false, method: :group_epic_url # rubocop:disable Graphql/Descriptions
field :relation_path, GraphQL::STRING_TYPE, null: true, method: :group_epic_link_path # rubocop:disable Graphql/Descriptions
field :reference, GraphQL::STRING_TYPE, null: false, method: :epic_reference do # rubocop:disable Graphql/Descriptions
argument :full, GraphQL::BOOLEAN_TYPE, required: false, default_value: false # rubocop:disable Graphql/Descriptions
end
field :issues,
field :issues, # rubocop:disable Graphql/Descriptions
Types::EpicIssueType.connection_type,
null: true,
resolver: Resolvers::EpicIssuesResolver
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment