Skip to content
Snippets Groups Projects
Commit 70342865 authored by Gaurav Marwal's avatar Gaurav Marwal
Browse files

Resolve Layout/ArgumentAlignment offenses 50

Changelog: other

EE: true
parent 57ae2ec5
No related branches found
No related tags found
2 merge requests!162233Draft: Script to update Topology Service Gem,!151247Resolve Layout/ArgumentAlignment offenses 50
Showing
with 29 additions and 42 deletions
......@@ -760,19 +760,6 @@ Layout/ArgumentAlignment:
- 'ee/app/graphql/types/work_items/widgets/iteration_input_type.rb'
- 'ee/app/graphql/types/work_items/widgets/iteration_type.rb'
- 'ee/app/graphql/types/work_items/widgets/progress_input_type.rb'
- 'ee/app/graphql/types/work_items/widgets/requirement_legacy_filter_input_type.rb'
- 'ee/app/graphql/types/work_items/widgets/requirement_legacy_type.rb'
- 'ee/app/graphql/types/work_items/widgets/status_filter_input_type.rb'
- 'ee/app/graphql/types/work_items/widgets/status_input_type.rb'
- 'ee/app/graphql/types/work_items/widgets/weight_input_type.rb'
- 'ee/app/services/analytics/devops_adoption/enabled_namespaces/bulk_find_or_create_service.rb'
- 'ee/app/services/audit_events/streaming/event_type_filters/destroy_service.rb'
- 'ee/app/services/auto_merge/merge_train_service.rb'
- 'ee/app/services/dashboard/projects/create_service.rb'
- 'ee/app/services/dora/aggregate_metrics_service.rb'
- 'ee/app/services/ee/applications/create_service.rb'
- 'ee/app/services/ee/boards/issues/list_service.rb'
- 'ee/app/services/ee/issues/base_service.rb'
- 'ee/app/services/ee/issues/clone_service.rb'
- 'ee/app/services/ee/issues/move_service.rb'
- 'ee/app/services/ee/keys/create_service.rb'
......
......@@ -7,8 +7,8 @@ class RequirementLegacyFilterInputType < BaseInputObject
graphql_name 'RequirementLegacyFilterInput'
argument :legacy_iids, [GraphQL::Types::String],
required: true,
description: 'List of legacy requirement IIDs of work items. or example `["1", "2"]`.'
required: true,
description: 'List of legacy requirement IIDs of work items. or example `["1", "2"]`.'
end
end
end
......
......@@ -11,8 +11,8 @@ class RequirementLegacyType < BaseObject
implements Types::WorkItems::WidgetInterface
field :legacy_iid, GraphQL::Types::Int,
deprecated: { reason: 'Use Work Item IID instead', milestone: '15.9' },
null: true, description: 'Legacy requirement IID associated with the work item.'
deprecated: { reason: 'Use Work Item IID instead', milestone: '15.9' },
null: true, description: 'Legacy requirement IID associated with the work item.'
end
# rubocop:enable Graphql/AuthorizeTypes
end
......
......@@ -7,8 +7,8 @@ class StatusFilterInputType < BaseInputObject
graphql_name 'StatusFilterInput'
argument :status, ::Types::RequirementsManagement::RequirementStatusFilterEnum,
required: true,
description: 'Status of the work item.'
required: true,
description: 'Status of the work item.'
end
end
end
......
......@@ -7,8 +7,8 @@ class StatusInputType < BaseInputObject
graphql_name 'StatusInput'
argument :status, ::Types::RequirementsManagement::TestReportStateEnum,
required: true,
description: 'Status to assign to the work item.'
required: true,
description: 'Status to assign to the work item.'
end
end
end
......
......@@ -7,8 +7,8 @@ class WeightInputType < BaseInputObject
graphql_name 'WorkItemWidgetWeightInput'
argument :weight, GraphQL::Types::Int,
required: :nullable,
description: 'Weight of the work item.'
required: :nullable,
description: 'Weight of the work item.'
end
end
end
......
......@@ -30,7 +30,7 @@ def authorize!
def services
@services ||= params[:namespaces].map do |namespace|
FindOrCreateService.new(current_user: current_user,
params: { namespace: namespace, display_namespace: params[:display_namespace] })
params: { namespace: namespace, display_namespace: params[:display_namespace] })
end
end
end
......
......@@ -28,7 +28,7 @@ def validate!
def error_message(missing_filters)
format(_("Couldn't find event type filters where audit event type(s): %{missing_filters}"),
missing_filters: missing_filters.join(', '))
missing_filters: missing_filters.join(', '))
end
end
end
......
......@@ -31,9 +31,9 @@ def execute(project_ids)
private
attr_reader :feature,
:ability,
:projects_relation,
:user
:ability,
:projects_relation,
:user
def find_projects(project_ids)
ProjectsFinder.new(
......
......@@ -107,7 +107,7 @@ def validate_container
def validate
unless (end_date - start_date).days <= MAX_RANGE
return error(_("Date range must be shorter than %{max_range} days.") % { max_range: MAX_RANGE.in_days.to_i },
:bad_request)
:bad_request)
end
unless start_date < end_date
......@@ -120,24 +120,24 @@ def validate
unless ::Dora::DailyMetrics::AVAILABLE_INTERVALS.include?(interval)
return error(_("The interval must be one of %{intervals}.") % { intervals: ::Dora::DailyMetrics::AVAILABLE_INTERVALS.join(',') },
:bad_request)
:bad_request)
end
if metrics.empty?
return error(_("The metric must be one of %{metrics}.") % { metrics: ::Dora::DailyMetrics::AVAILABLE_METRICS.join(',') },
:bad_request)
:bad_request)
end
metrics.each do |metric|
unless ::Dora::DailyMetrics::AVAILABLE_METRICS.include?(metric)
return error(_("The metric must be one of %{metrics}.") % { metrics: ::Dora::DailyMetrics::AVAILABLE_METRICS.join(',') },
:bad_request)
:bad_request)
end
end
unless environment_tiers.all? { |tier| Environment.tiers[tier] }
return error(_("The environment tiers must be from %{environment_tiers}.") % { environment_tiers: Environment.tiers.keys.join(', ') },
:bad_request)
:bad_request)
end
nil
......
......@@ -15,10 +15,10 @@ def execute(request)
def audit_event_service(entity, ip_address)
::AuditEventService.new(current_user,
entity,
action: :custom,
custom_message: 'OAuth application added',
ip_address: ip_address)
entity,
action: :custom,
custom_message: 'OAuth application added',
ip_address: ip_address)
end
end
end
......
......@@ -100,7 +100,7 @@ def without_milestones_from_lists(issues)
return issues if all_milestone_lists.empty?
issues.where("milestone_id NOT IN (?) OR milestone_id IS NULL",
all_milestone_lists.select(:milestone_id))
all_milestone_lists.select(:milestone_id))
end
# rubocop: enable CodeReuse/ActiveRecord
......
......@@ -29,10 +29,10 @@ def assign_epic(issue, epic)
if had_epic
::Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_changed_epic_action(author: current_user,
project: project)
project: project)
else
::Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_added_to_epic_action(author: current_user,
project: project)
project: project)
end
end
end
......@@ -45,7 +45,7 @@ def unassign_epic(issue)
next unless result[:status] == :success
::Gitlab::UsageDataCounters::IssueActivityUniqueCounter.track_issue_removed_from_epic_action(author: current_user,
project: project)
project: project)
end
end
......@@ -69,7 +69,7 @@ def find_epic(issue, epic_id)
return unless group.present?
EpicsFinder.new(current_user, group_id: group.id,
include_ancestor_groups: true).find(epic_id)
include_ancestor_groups: true).find(epic_id)
end
def epic_param_present?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment