Commit 95d737d8 authored by Rajendra Kadam's avatar Rajendra Kadam

Fix Layout/ClosingParenthesisIndentation cop

This fixes the cop for files that were
before exluded in .rubocop_todo

Add changelog
parent fd8c24f8
...@@ -18,17 +18,6 @@ Capybara/CurrentPathExpectation: ...@@ -18,17 +18,6 @@ Capybara/CurrentPathExpectation:
Layout/ArgumentAlignment: Layout/ArgumentAlignment:
Enabled: false Enabled: false
# Offense count: 13
# Cop supports --auto-correct.
Layout/ClosingParenthesisIndentation:
Exclude:
- 'db/post_migrate/20180704145007_update_project_indexes.rb'
- 'ee/db/geo/migrate/20180405074130_add_partial_index_project_repository_verification.rb'
- 'spec/services/issues/resolve_discussions_spec.rb'
- 'spec/services/projects/update_service_spec.rb'
- 'spec/support/helpers/stub_object_storage.rb'
- 'spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb'
# Offense count: 72 # Offense count: 72
# Cop supports --auto-correct. # Cop supports --auto-correct.
Layout/EmptyLinesAroundArguments: Layout/EmptyLinesAroundArguments:
......
---
title: Fix Layout/ClosingParenthesisIndentation cop
merge_request: 41084
author: Rajendra Kadam
type: fixed
...@@ -12,13 +12,13 @@ class AddPartialIndexProjectRepositoryVerification < ActiveRecord::Migration[4.2 ...@@ -12,13 +12,13 @@ class AddPartialIndexProjectRepositoryVerification < ActiveRecord::Migration[4.2
[:project_id], [:project_id],
name: REPO_INDEX_NAME, name: REPO_INDEX_NAME,
where: 'repository_verification_checksum_sha IS NULL AND last_repository_verification_failure IS NULL' where: 'repository_verification_checksum_sha IS NULL AND last_repository_verification_failure IS NULL'
) )
add_concurrent_index(:project_registry, add_concurrent_index(:project_registry,
[:project_id], [:project_id],
name: WIKI_INDEX_NAME, name: WIKI_INDEX_NAME,
where: 'wiki_verification_checksum_sha IS NULL AND last_wiki_verification_failure IS NULL' where: 'wiki_verification_checksum_sha IS NULL AND last_wiki_verification_failure IS NULL'
) )
end end
def down def down
......
...@@ -79,7 +79,7 @@ RSpec.describe Issues::ResolveDiscussions do ...@@ -79,7 +79,7 @@ RSpec.describe Issues::ResolveDiscussions do
noteable: merge_request, noteable: merge_request,
project: merge_request.target_project, project: merge_request.target_project,
line_number: 15 line_number: 15
)]) )])
service = DummyService.new( service = DummyService.new(
project, project,
user, user,
......
...@@ -272,7 +272,7 @@ RSpec.describe Projects::UpdateService do ...@@ -272,7 +272,7 @@ RSpec.describe Projects::UpdateService do
result = update_project(project, user, project_feature_attributes: result = update_project(project, user, project_feature_attributes:
{ issues_access_level: ProjectFeature::PRIVATE } { issues_access_level: ProjectFeature::PRIVATE }
) )
expect(result).to eq({ status: :success }) expect(result).to eq({ status: :success })
expect(project.project_feature.issues_access_level).to be(ProjectFeature::PRIVATE) expect(project.project_feature.issues_access_level).to be(ProjectFeature::PRIVATE)
...@@ -479,14 +479,14 @@ RSpec.describe Projects::UpdateService do ...@@ -479,14 +479,14 @@ RSpec.describe Projects::UpdateService do
attributes_for(:prometheus_service, attributes_for(:prometheus_service,
project: project, project: project,
properties: { api_url: "http://new.prometheus.com", manual_configuration: "0" } properties: { api_url: "http://new.prometheus.com", manual_configuration: "0" }
) )
end end
let!(:prometheus_service) do let!(:prometheus_service) do
create(:prometheus_service, create(:prometheus_service,
project: project, project: project,
properties: { api_url: "http://old.prometheus.com", manual_configuration: "0" } properties: { api_url: "http://old.prometheus.com", manual_configuration: "0" }
) )
end end
it 'updates existing record' do it 'updates existing record' do
...@@ -503,7 +503,7 @@ RSpec.describe Projects::UpdateService do ...@@ -503,7 +503,7 @@ RSpec.describe Projects::UpdateService do
attributes_for(:prometheus_service, attributes_for(:prometheus_service,
project: project, project: project,
properties: { api_url: "http://example.prometheus.com", manual_configuration: "0" } properties: { api_url: "http://example.prometheus.com", manual_configuration: "0" }
) )
end end
it 'creates new record' do it 'creates new record' do
...@@ -519,7 +519,7 @@ RSpec.describe Projects::UpdateService do ...@@ -519,7 +519,7 @@ RSpec.describe Projects::UpdateService do
attributes_for(:prometheus_service, attributes_for(:prometheus_service,
project: project, project: project,
properties: { api_url: nil, manual_configuration: "1" } properties: { api_url: nil, manual_configuration: "1" }
) )
end end
it 'does not create new record' do it 'does not create new record' do
......
...@@ -21,7 +21,7 @@ module StubObjectStorage ...@@ -21,7 +21,7 @@ module StubObjectStorage
proxy_download: false, proxy_download: false,
background_upload: false, background_upload: false,
direct_upload: false direct_upload: false
) )
allow(config).to receive(:enabled) { enabled } allow(config).to receive(:enabled) { enabled }
allow(config).to receive(:proxy_download) { proxy_download } allow(config).to receive(:proxy_download) { proxy_download }
allow(config).to receive(:background_upload) { background_upload } allow(config).to receive(:background_upload) { background_upload }
......
...@@ -16,21 +16,21 @@ RSpec.describe RemoveUnreferencedLfsObjectsWorker do ...@@ -16,21 +16,21 @@ RSpec.describe RemoveUnreferencedLfsObjectsWorker do
create(:lfs_objects_project, create(:lfs_objects_project,
project: project1, project: project1,
lfs_object: referenced_lfs_object1 lfs_object: referenced_lfs_object1
) )
end end
let!(:lfs_objects_project2_1) do let!(:lfs_objects_project2_1) do
create(:lfs_objects_project, create(:lfs_objects_project,
project: project2, project: project2,
lfs_object: referenced_lfs_object1 lfs_object: referenced_lfs_object1
) )
end end
let!(:lfs_objects_project1_2) do let!(:lfs_objects_project1_2) do
create(:lfs_objects_project, create(:lfs_objects_project,
project: project1, project: project1,
lfs_object: referenced_lfs_object2 lfs_object: referenced_lfs_object2
) )
end end
it 'removes unreferenced lfs objects' do it 'removes unreferenced lfs objects' do
......
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