Commit efb398d1 authored by Peter Leitzen's avatar Peter Leitzen Committed by Nick Thomas

Resolve auto-correctable rule todo Layout/ClosingHeredocIndentation

parent 1d927563
...@@ -18,19 +18,6 @@ Capybara/CurrentPathExpectation: ...@@ -18,19 +18,6 @@ Capybara/CurrentPathExpectation:
Layout/ArgumentAlignment: Layout/ArgumentAlignment:
Enabled: false Enabled: false
# Offense count: 13
# Cop supports --auto-correct.
Layout/ClosingHeredocIndentation:
Exclude:
- 'app/graphql/mutations/merge_requests/set_wip.rb'
- 'ee/db/geo/migrate/20180322062741_migrate_ci_job_artifacts_to_separate_registry.rb'
- 'ee/lib/gitlab/geo/health_check.rb'
- 'spec/features/merge_request/user_sees_diff_spec.rb'
- 'spec/lib/gitlab/asciidoc_spec.rb'
- 'spec/lib/gitlab/checks/project_moved_spec.rb'
- 'spec/rubocop/cop/active_record_association_reload_spec.rb'
- 'spec/services/task_list_toggle_service_spec.rb'
# Offense count: 13 # Offense count: 13
# Cop supports --auto-correct. # Cop supports --auto-correct.
Layout/ClosingParenthesisIndentation: Layout/ClosingParenthesisIndentation:
......
...@@ -9,8 +9,8 @@ module Mutations ...@@ -9,8 +9,8 @@ module Mutations
GraphQL::BOOLEAN_TYPE, GraphQL::BOOLEAN_TYPE,
required: true, required: true,
description: <<~DESC description: <<~DESC
Whether or not to set the merge request as a WIP. Whether or not to set the merge request as a WIP.
DESC DESC
def resolve(project_path:, iid:, wip: nil) def resolve(project_path:, iid:, wip: nil)
merge_request = authorized_find!(project_path: project_path, iid: iid) merge_request = authorized_find!(project_path: project_path, iid: iid)
......
...@@ -38,7 +38,7 @@ class MigrateCiJobArtifactsToSeparateRegistry < ActiveRecord::Migration[4.2] ...@@ -38,7 +38,7 @@ class MigrateCiJobArtifactsToSeparateRegistry < ActiveRecord::Migration[4.2]
$BODY$ $BODY$
LANGUAGE 'plpgsql' LANGUAGE 'plpgsql'
VOLATILE; VOLATILE;
EOF EOF
execute <<~EOF execute <<~EOF
CREATE TRIGGER replicate_job_artifact_registry CREATE TRIGGER replicate_job_artifact_registry
......
...@@ -54,7 +54,7 @@ module Gitlab ...@@ -54,7 +54,7 @@ module Gitlab
EXTRACT (EPOCH FROM now() - #{Gitlab::Database.pg_last_xact_replay_timestamp}())::INTEGER EXTRACT (EPOCH FROM now() - #{Gitlab::Database.pg_last_xact_replay_timestamp}())::INTEGER
END END
AS replication_lag AS replication_lag
SQL SQL
end end
def db_migrate_path def db_migrate_path
......
...@@ -97,7 +97,7 @@ RSpec.describe 'Merge request > User sees diff', :js do ...@@ -97,7 +97,7 @@ RSpec.describe 'Merge request > User sees diff', :js do
let c = 3; let c = 3;
let d = 3; let d = 3;
} }
CONTENT CONTENT
new_file_content = new_file_content =
<<~CONTENT <<~CONTENT
...@@ -107,7 +107,7 @@ RSpec.describe 'Merge request > User sees diff', :js do ...@@ -107,7 +107,7 @@ RSpec.describe 'Merge request > User sees diff', :js do
let c = 3; let c = 3;
let x = 3; let x = 3;
} }
CONTENT CONTENT
file_name = 'xss_file.rs' file_name = 'xss_file.rs'
......
...@@ -404,7 +404,7 @@ module Gitlab ...@@ -404,7 +404,7 @@ module Gitlab
++++ ++++
stem:[2+2] is 4 stem:[2+2] is 4
MD MD
expect(render(input, context)).to include('<pre data-math-style="display" class="code math js-render-math"><code>eta_x gamma</code></pre>') expect(render(input, context)).to include('<pre data-math-style="display" class="code math js-render-math"><code>eta_x gamma</code></pre>')
expect(render(input, context)).to include('<p><code data-math-style="inline" class="code math js-render-math">2+2</code> is 4</p>') expect(render(input, context)).to include('<p><code data-math-style="inline" class="code math js-render-math">2+2</code> is 4</p>')
......
...@@ -57,12 +57,12 @@ RSpec.describe Gitlab::Checks::ProjectMoved, :clean_gitlab_redis_shared_state do ...@@ -57,12 +57,12 @@ RSpec.describe Gitlab::Checks::ProjectMoved, :clean_gitlab_redis_shared_state do
shared_examples 'returns redirect message' do shared_examples 'returns redirect message' do
it do it do
message = <<~MSG message = <<~MSG
Project '#{redirect_path}' was moved to '#{project.full_path}'. Project '#{redirect_path}' was moved to '#{project.full_path}'.
Please update your Git remote: Please update your Git remote:
git remote set-url origin #{url_to_repo} git remote set-url origin #{url_to_repo}
MSG MSG
expect(subject.message).to eq(message) expect(subject.message).to eq(message)
end end
......
...@@ -15,7 +15,7 @@ RSpec.describe RuboCop::Cop::ActiveRecordAssociationReload, type: :rubocop do ...@@ -15,7 +15,7 @@ RSpec.describe RuboCop::Cop::ActiveRecordAssociationReload, type: :rubocop do
users = User.all users = User.all
users.reload users.reload
^^^^^^ Use reset instead of reload. For more details check the https://gitlab.com/gitlab-org/gitlab-foss/issues/60218. ^^^^^^ Use reset instead of reload. For more details check the https://gitlab.com/gitlab-org/gitlab-foss/issues/60218.
PATTERN PATTERN
end end
it 'does not register an offense on reset usage' do it 'does not register an offense on reset usage' do
......
...@@ -119,7 +119,7 @@ RSpec.describe TaskListToggleService do ...@@ -119,7 +119,7 @@ RSpec.describe TaskListToggleService do
<<-EOT.strip_heredoc <<-EOT.strip_heredoc
> > * [ ] Task 1 > > * [ ] Task 1
> * [x] Task 2 > * [x] Task 2
EOT EOT
markdown_html = parse_markdown(markdown) markdown_html = parse_markdown(markdown)
toggler = described_class.new(markdown, markdown_html, toggler = described_class.new(markdown, markdown_html,
...@@ -140,7 +140,7 @@ RSpec.describe TaskListToggleService do ...@@ -140,7 +140,7 @@ RSpec.describe TaskListToggleService do
* [ ] Task 1 * [ ] Task 1
* [x] Task 2 * [x] Task 2
EOT EOT
markdown_html = parse_markdown(markdown) markdown_html = parse_markdown(markdown)
toggler = described_class.new(markdown, markdown_html, toggler = described_class.new(markdown, markdown_html,
...@@ -158,7 +158,7 @@ RSpec.describe TaskListToggleService do ...@@ -158,7 +158,7 @@ RSpec.describe TaskListToggleService do
<<-EOT.strip_heredoc <<-EOT.strip_heredoc
- - [ ] Task 1 - - [ ] Task 1
- [x] Task 2 - [x] Task 2
EOT EOT
markdown_html = parse_markdown(markdown) markdown_html = parse_markdown(markdown)
toggler = described_class.new(markdown, markdown_html, toggler = described_class.new(markdown, markdown_html,
...@@ -175,7 +175,7 @@ RSpec.describe TaskListToggleService do ...@@ -175,7 +175,7 @@ RSpec.describe TaskListToggleService do
<<-EOT.strip_heredoc <<-EOT.strip_heredoc
1. - [ ] Task 1 1. - [ ] Task 1
- [x] Task 2 - [x] Task 2
EOT EOT
markdown_html = parse_markdown(markdown) markdown_html = parse_markdown(markdown)
toggler = described_class.new(markdown, markdown_html, toggler = described_class.new(markdown, markdown_html,
......
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