diff --git a/.rubocop_todo/layout/hash_alignment.yml b/.rubocop_todo/layout/hash_alignment.yml
index 11f9ee53e67fe8c09db5611c1257ced3399d3b99..b09539144d917a51d687cfea0dc7e5de2bf0f163 100644
--- a/.rubocop_todo/layout/hash_alignment.yml
+++ b/.rubocop_todo/layout/hash_alignment.yml
@@ -96,26 +96,6 @@ Layout/HashAlignment:
     - 'spec/lib/gitlab/metrics/subscribers/action_view_spec.rb'
     - 'spec/lib/gitlab/metrics/subscribers/active_record_spec.rb'
     - 'spec/lib/gitlab/metrics/subscribers/load_balancing_spec.rb'
-    - 'spec/lib/gitlab/metrics/web_transaction_spec.rb'
-    - 'spec/lib/gitlab/omniauth_initializer_spec.rb'
-    - 'spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb'
-    - 'spec/lib/gitlab/sidekiq_death_handler_spec.rb'
-    - 'spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb'
-    - 'spec/lib/gitlab/slug/environment_spec.rb'
-    - 'spec/lib/gitlab/tracking_spec.rb'
-    - 'spec/lib/gitlab/usage_data/topology_spec.rb'
-    - 'spec/lib/gitlab/usage_data_counters/merge_request_activity_unique_counter_spec.rb'
-    - 'spec/lib/gitlab/usage_data_counters/note_counter_spec.rb'
-    - 'spec/lib/gitlab/usage_data_spec.rb'
-    - 'spec/lib/gitlab/utils_spec.rb'
-    - 'spec/lib/gitlab/word_diff/parser_spec.rb'
-    - 'spec/lib/marginalia_spec.rb'
-    - 'spec/lib/security/ci_configuration/sast_build_action_spec.rb'
-    - 'spec/mailers/emails/pipelines_spec.rb'
-    - 'spec/migrations/20210804150320_create_base_work_item_types_spec.rb'
-    - 'spec/migrations/20210831203408_upsert_base_work_item_types_spec.rb'
-    - 'spec/migrations/20211117084814_migrate_remaining_u2f_registrations_spec.rb'
-    - 'spec/migrations/20211126204445_add_task_to_work_item_types_spec.rb'
     - 'spec/models/ci/build_spec.rb'
     - 'spec/models/ci/pipeline_spec.rb'
     - 'spec/models/ci/processable_spec.rb'
diff --git a/spec/lib/gitlab/metrics/web_transaction_spec.rb b/spec/lib/gitlab/metrics/web_transaction_spec.rb
index d6590efcf4fde8c17f96fda4f47a3a6cfb1f7c62..dc59fa804c4f2d74d938db69b5550e532ec06ca9 100644
--- a/spec/lib/gitlab/metrics/web_transaction_spec.rb
+++ b/spec/lib/gitlab/metrics/web_transaction_spec.rb
@@ -66,8 +66,8 @@
       before do
         route = double(:route, request_method: 'GET', path: '/:version/projects/:id/archive(.:format)')
         endpoint = double(:endpoint, route: route,
-                          options: { for: API::Projects, path: [":id/archive"] },
-                          namespace: "/projects")
+                                     options: { for: API::Projects, path: [":id/archive"] },
+                                     namespace: "/projects")
 
         env['api.endpoint'] = endpoint
 
diff --git a/spec/lib/gitlab/omniauth_initializer_spec.rb b/spec/lib/gitlab/omniauth_initializer_spec.rb
index c91b14a33ba02ffd8ed819b041d14269999f6ac6..563c97fa2cbc277ae8f9b50db28e3a6a447ffbbd 100644
--- a/spec/lib/gitlab/omniauth_initializer_spec.rb
+++ b/spec/lib/gitlab/omniauth_initializer_spec.rb
@@ -31,7 +31,7 @@
     context 'when there is an app_id and an app_secret, and an array of args' do
       let(:provider) do
         {
-          'name' =>  'unknown',
+          'name' => 'unknown',
           'app_id' => 1,
           'app_secret' => 2,
           'args' => %w[one two three]
@@ -46,7 +46,7 @@
     context 'when there is an app_id and an app_secret, and an array of args, and default values' do
       let(:provider) do
         {
-          'name' =>  'unknown',
+          'name' => 'unknown',
           'app_id' => 1,
           'app_secret' => 2,
           'args' => %w[one two three]
@@ -68,7 +68,7 @@
     context 'when there is an app_id and an app_secret, and a hash of args' do
       let(:provider) do
         {
-          'name' =>  'unknown',
+          'name' => 'unknown',
           'app_id' => 1,
           'app_secret' => 2,
           'args' => { 'foo' => 100, 'bar' => 200, 'nested' => { 'value' => 300 } }
@@ -84,7 +84,7 @@
     context 'when there is an app_id and an app_secret, and a hash of args, and default arguments' do
       let(:provider) do
         {
-          'name' =>  'unknown',
+          'name' => 'unknown',
           'app_id' => 1,
           'app_secret' => 2,
           'args' => { 'foo' => 100, 'bar' => 200, 'nested' => { 'value' => 300 } }
@@ -106,7 +106,7 @@
     context 'when there is an app_id and an app_secret, no args, and default values' do
       let(:provider) do
         {
-          'name' =>  'unknown',
+          'name' => 'unknown',
           'app_id' => 1,
           'app_secret' => 2
         }
@@ -127,7 +127,7 @@
     context 'when there are args, of an unsupported type' do
       let(:provider) do
         {
-          'name' =>  'unknown',
+          'name' => 'unknown',
           'args' => 1
         }
       end
diff --git a/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb b/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb
index 635f572daef04d3dbbd54eb6e9f48186dfa6f0bb..dff04a2e5093c3a733b23544a8cacc8711cb323f 100644
--- a/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb
+++ b/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb
@@ -326,7 +326,7 @@
           class: described_class.to_s,
           signal: signal,
           pid: pid,
-          message:   "sending Sidekiq worker PID-#{pid} #{signal} (#{explanation})")
+          message: "sending Sidekiq worker PID-#{pid} #{signal} (#{explanation})")
       expect(Process).to receive(:kill).with(signal, pid).ordered
 
       subject
@@ -340,7 +340,7 @@
           class: described_class.to_s,
           signal: signal,
           pid: pid,
-          message:   "sending Sidekiq worker PGRP-#{pid} #{signal} (#{explanation})")
+          message: "sending Sidekiq worker PGRP-#{pid} #{signal} (#{explanation})")
       expect(Process).to receive(:kill).with(signal, 0).ordered
 
       subject
diff --git a/spec/lib/gitlab/sidekiq_death_handler_spec.rb b/spec/lib/gitlab/sidekiq_death_handler_spec.rb
index e3f9f8277a0706810536754091745da80ab75758..434642bf3efe21fa27c4c33c4e5627622d5ed9cf 100644
--- a/spec/lib/gitlab/sidekiq_death_handler_spec.rb
+++ b/spec/lib/gitlab/sidekiq_death_handler_spec.rb
@@ -24,8 +24,8 @@
         expect(described_class.counter)
           .to receive(:increment)
                 .with({ queue: 'test_queue', worker: 'TestWorker',
-                      urgency: 'low', external_dependencies: 'yes',
-                      feature_category: 'users', boundary: 'cpu' })
+                        urgency: 'low', external_dependencies: 'yes',
+                        feature_category: 'users', boundary: 'cpu' })
 
         described_class.handler({ 'class' => 'TestWorker', 'queue' => 'test_queue' }, nil)
       end
@@ -40,8 +40,8 @@
         expect(described_class.counter)
           .to receive(:increment)
                 .with({ queue: 'test_queue', worker: 'TestWorker',
-                      urgency: '', external_dependencies: 'no',
-                      feature_category: '', boundary: '' })
+                        urgency: '', external_dependencies: 'no',
+                        feature_category: '', boundary: '' })
 
         described_class.handler({ 'class' => 'TestWorker', 'queue' => 'test_queue' }, nil)
       end
diff --git a/spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb b/spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb
index d6d24ea3a2433a2c6687443afe34204a06725b6e..52b50a143fcab43ab90db332448cc5ffcc469ad9 100644
--- a/spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb
+++ b/spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb
@@ -22,39 +22,39 @@
 
           expect(completion_seconds_metric)
             .to receive(:get).with({ queue: 'merge',
-                                   worker: 'MergeWorker',
-                                   urgency: 'high',
-                                   external_dependencies: 'no',
-                                   feature_category: 'source_code_management',
-                                   boundary: '',
-                                   job_status: 'done' })
+                                     worker: 'MergeWorker',
+                                     urgency: 'high',
+                                     external_dependencies: 'no',
+                                     feature_category: 'source_code_management',
+                                     boundary: '',
+                                     job_status: 'done' })
 
           expect(completion_seconds_metric)
             .to receive(:get).with({ queue: 'merge',
-                                   worker: 'MergeWorker',
-                                   urgency: 'high',
-                                   external_dependencies: 'no',
-                                   feature_category: 'source_code_management',
-                                   boundary: '',
-                                   job_status: 'fail' })
+                                     worker: 'MergeWorker',
+                                     urgency: 'high',
+                                     external_dependencies: 'no',
+                                     feature_category: 'source_code_management',
+                                     boundary: '',
+                                     job_status: 'fail' })
 
           expect(completion_seconds_metric)
             .to receive(:get).with({ queue: 'default',
-                                   worker: 'Ci::BuildFinishedWorker',
-                                   urgency: 'high',
-                                   external_dependencies: 'no',
-                                   feature_category: 'continuous_integration',
-                                   boundary: 'cpu',
-                                   job_status: 'done' })
+                                     worker: 'Ci::BuildFinishedWorker',
+                                     urgency: 'high',
+                                     external_dependencies: 'no',
+                                     feature_category: 'continuous_integration',
+                                     boundary: 'cpu',
+                                     job_status: 'done' })
 
           expect(completion_seconds_metric)
             .to receive(:get).with({ queue: 'default',
-                                   worker: 'Ci::BuildFinishedWorker',
-                                   urgency: 'high',
-                                   external_dependencies: 'no',
-                                   feature_category: 'continuous_integration',
-                                   boundary: 'cpu',
-                                   job_status: 'fail' })
+                                     worker: 'Ci::BuildFinishedWorker',
+                                     urgency: 'high',
+                                     external_dependencies: 'no',
+                                     feature_category: 'continuous_integration',
+                                     boundary: 'cpu',
+                                     job_status: 'fail' })
 
           described_class.initialize_process_metrics
         end
diff --git a/spec/lib/gitlab/slug/environment_spec.rb b/spec/lib/gitlab/slug/environment_spec.rb
index 5456501eb8b479fc219d78a9990b8c31623e27b7..e8f0fba27b2568fb17a011676e53ae262914efa7 100644
--- a/spec/lib/gitlab/slug/environment_spec.rb
+++ b/spec/lib/gitlab/slug/environment_spec.rb
@@ -7,21 +7,21 @@
     {
       "staging-12345678901234567" => "staging-123456789-q517sa",
       "9-staging-123456789012345" => "env-9-staging-123-q517sa",
-      "staging-1234567890123456"  => "staging-1234567890123456",
+      "staging-1234567890123456" => "staging-1234567890123456",
       "staging-1234567890123456-" => "staging-123456789-q517sa",
-      "production"                => "production",
-      "PRODUCTION"                => "production-q517sa",
-      "review/1-foo"              => "review-1-foo-q517sa",
-      "1-foo"                     => "env-1-foo-q517sa",
-      "1/foo"                     => "env-1-foo-q517sa",
-      "foo-"                      => "foo",
-      "foo--bar"                  => "foo-bar-q517sa",
-      "foo**bar"                  => "foo-bar-q517sa",
-      "*-foo"                     => "env-foo-q517sa",
-      "staging-12345678-"         => "staging-12345678",
+      "production" => "production",
+      "PRODUCTION" => "production-q517sa",
+      "review/1-foo" => "review-1-foo-q517sa",
+      "1-foo" => "env-1-foo-q517sa",
+      "1/foo" => "env-1-foo-q517sa",
+      "foo-" => "foo",
+      "foo--bar" => "foo-bar-q517sa",
+      "foo**bar" => "foo-bar-q517sa",
+      "*-foo" => "env-foo-q517sa",
+      "staging-12345678-" => "staging-12345678",
       "staging-12345678-01234567" => "staging-12345678-q517sa",
-      ""                          => "env-q517sa",
-      nil                         => "env-q517sa"
+      "" => "env-q517sa",
+      nil => "env-q517sa"
     }.each do |name, matcher|
       before do
         # ('a' * 64).to_i(16).to_s(36).last(6) gives 'q517sa'
diff --git a/spec/lib/gitlab/tracking_spec.rb b/spec/lib/gitlab/tracking_spec.rb
index 028c985f3b384401dcc560a8e97ae25818fb8d25..7f30d794aeee16e26614b188c82ade9f8f6a8b1d 100644
--- a/spec/lib/gitlab/tracking_spec.rb
+++ b/spec/lib/gitlab/tracking_spec.rb
@@ -132,9 +132,16 @@
           expect(args[:context].last).to eq(other_context)
         end
 
-        described_class.event('category', 'action', label: 'label', property: 'property', value: 1.5,
-                              context: [other_context], project: project, user: user, namespace: namespace,
-                              extra_key_1: 'extra value 1', extra_key_2: 'extra value 2')
+        described_class.event('category', 'action',
+          label: 'label',
+          property: 'property',
+          value: 1.5,
+          context: [other_context],
+          project: project,
+          user: user,
+          namespace: namespace,
+          extra_key_1: 'extra value 1',
+          extra_key_2: 'extra value 2')
       end
     end
 
@@ -197,8 +204,15 @@
         expect(args[:extra_key_1]).to eq('extra value 1')
       end
 
-      described_class.definition('filename', category: nil, action: nil, label: 'label', property: '...',
-                                  project: project, user: user, namespace: namespace, extra_key_1: 'extra value 1')
+      described_class.definition('filename',
+        category: nil,
+        action: nil,
+        label: 'label',
+        property: '...',
+        project: project,
+        user: user,
+        namespace: namespace,
+        extra_key_1: 'extra value 1')
     end
   end
 
diff --git a/spec/lib/gitlab/usage_data/topology_spec.rb b/spec/lib/gitlab/usage_data/topology_spec.rb
index 737580e349333aca44c75f2c93e47854e26a5ea7..dfdf8eaabe817ca9898eba8f648e411dade3d350 100644
--- a/spec/lib/gitlab/usage_data/topology_spec.rb
+++ b/spec/lib/gitlab/usage_data/topology_spec.rb
@@ -187,7 +187,7 @@
           [
             {
               'metric' => { 'instance' => 'localhost:9100' },
-              'value' =>  [1000, '512']
+              'value' => [1000, '512']
             }
           ]
         end
@@ -196,7 +196,7 @@
           [
             {
               'metric' => { 'instance' => 'localhost:9100' },
-              'value' =>  [1000, '0.35']
+              'value' => [1000, '0.35']
             }
           ]
         end
@@ -224,23 +224,23 @@
           [
             {
               'metric' => { 'instance' => 'localhost:8080', 'job' => 'gitlab-rails' },
-              'value' =>  [1000, '10']
+              'value' => [1000, '10']
             },
             {
               'metric' => { 'instance' => '127.0.0.1:8090', 'job' => 'gitlab-sidekiq' },
-              'value' =>  [1000, '11']
+              'value' => [1000, '11']
             },
             {
               'metric' => { 'instance' => '0.0.0.0:9090', 'job' => 'prometheus' },
-              'value' =>  [1000, '12']
+              'value' => [1000, '12']
             },
             {
               'metric' => { 'instance' => '[::1]:1234', 'job' => 'redis' },
-              'value' =>  [1000, '13']
+              'value' => [1000, '13']
             },
             {
               'metric' => { 'instance' => '[::]:1234', 'job' => 'postgres' },
-              'value' =>  [1000, '14']
+              'value' => [1000, '14']
             }
           ]
         end
@@ -640,7 +640,7 @@ def receive_node_service_memory_rss_query(result: nil)
       .and_return(result || [
         {
           'metric' => { 'instance' => 'instance1:8080', 'job' => 'gitlab-rails' },
-          'value' =>  [1000, '300']
+          'value' => [1000, '300']
         },
         {
           'metric' => { 'instance' => 'instance1:8090', 'job' => 'gitlab-sidekiq' },
diff --git a/spec/lib/gitlab/usage_data_counters/merge_request_activity_unique_counter_spec.rb b/spec/lib/gitlab/usage_data_counters/merge_request_activity_unique_counter_spec.rb
index 3f44cfdcf2743362961265b6a63c9df32f4bb28d..74e63d219bdd4283b6ccd5525e28276808ffff34 100644
--- a/spec/lib/gitlab/usage_data_counters/merge_request_activity_unique_counter_spec.rb
+++ b/spec/lib/gitlab/usage_data_counters/merge_request_activity_unique_counter_spec.rb
@@ -100,9 +100,9 @@
       subject
 
       expect_snowplow_event(
-        category:  'merge_requests',
+        category: 'merge_requests',
         action: 'i_code_review_user_approve_mr',
-        namespace:  target_project.namespace,
+        namespace: target_project.namespace,
         user: user,
         project: target_project
       )
diff --git a/spec/lib/gitlab/usage_data_counters/note_counter_spec.rb b/spec/lib/gitlab/usage_data_counters/note_counter_spec.rb
index 7e8f0172e06fe7fe8858ee78a5bcb88f46a31f58..687f8c2cd411c5fa8c49f5abcfc951face22609f 100644
--- a/spec/lib/gitlab/usage_data_counters/note_counter_spec.rb
+++ b/spec/lib/gitlab/usage_data_counters/note_counter_spec.rb
@@ -41,7 +41,7 @@
     let(:expected_totals) do
       { snippet_comment: 3,
         merge_request_comment: 4,
-        commit_comment:  5 }
+        commit_comment: 5 }
     end
 
     before do
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb
index 692b648314921c85a9cc06873e9284c91422c4ca..3b0cc0fb16b145059c6637867df84609caed6a48 100644
--- a/spec/lib/gitlab/usage_data_spec.rb
+++ b/spec/lib/gitlab/usage_data_spec.rb
@@ -583,10 +583,10 @@ def omniauth_providers
     it 'gathers object store usage correctly' do
       expect(subject[:object_store]).to eq(
         { artifacts: { enabled: true, object_store: { enabled: true, direct_upload: true, background_upload: false, provider: "AWS" } },
-         external_diffs: { enabled: false },
-         lfs: { enabled: true, object_store: { enabled: false, direct_upload: true, background_upload: false, provider: "AWS" } },
-         uploads: { enabled: nil, object_store: { enabled: false, direct_upload: true, background_upload: false, provider: "AWS" } },
-         packages: { enabled: true, object_store: { enabled: false, direct_upload: false, background_upload: true, provider: "AWS" } } }
+          external_diffs: { enabled: false },
+          lfs: { enabled: true, object_store: { enabled: false, direct_upload: true, background_upload: false, provider: "AWS" } },
+          uploads: { enabled: nil, object_store: { enabled: false, direct_upload: true, background_upload: false, provider: "AWS" } },
+          packages: { enabled: true, object_store: { enabled: false, direct_upload: false, background_upload: true, provider: "AWS" } } }
       )
     end
 
diff --git a/spec/lib/gitlab/utils_spec.rb b/spec/lib/gitlab/utils_spec.rb
index ad1a65ffae8c18253d11450d4ee8909dd83dddeb..61323f0646b6dbd7ab630582855ad45ba2900592 100644
--- a/spec/lib/gitlab/utils_spec.rb
+++ b/spec/lib/gitlab/utils_spec.rb
@@ -174,7 +174,7 @@
     {
       'TEST' => 'test',
       'project_with_underscores' => 'project-with-underscores',
-      'namespace/project' =>  'namespace-project',
+      'namespace/project' => 'namespace-project',
       'a' * 70 => 'a' * 63,
       'test_trailing_' => 'test-trailing'
     }.each do |original, expected|
diff --git a/spec/lib/gitlab/word_diff/parser_spec.rb b/spec/lib/gitlab/word_diff/parser_spec.rb
index 915c3f5a0f9800984591d24ee0e209f0c74188c3..18109a8160be42bcca4706c87afb6270f8c7b279 100644
--- a/spec/lib/gitlab/word_diff/parser_spec.rb
+++ b/spec/lib/gitlab/word_diff/parser_spec.rb
@@ -42,18 +42,18 @@
             { index: 1, old_pos: 2, new_pos: 2, text: 'Unchanged line', type: nil, marker_ranges: [] },
             { index: 2, old_pos: 3, new_pos: 3, text: '', type: nil, marker_ranges: [] },
             { index: 3, old_pos: 4, new_pos: 4, text: 'Old changeNew addition unchanged content', type: nil,
-                             marker_ranges: [
-                               Gitlab::MarkerRange.new(0, 9, mode: :deletion),
-                               Gitlab::MarkerRange.new(10, 21, mode: :addition)
-                             ] },
+              marker_ranges: [
+                Gitlab::MarkerRange.new(0, 9, mode: :deletion),
+                Gitlab::MarkerRange.new(10, 21, mode: :addition)
+              ] },
 
             { index: 4, old_pos: 50, new_pos: 50, text: '@@ -50,14 +50,13 @@', type: 'match', marker_ranges: [] },
             { index: 5, old_pos: 50, new_pos: 50, text: 'First change same same same_removed_added_end of the line', type: nil,
-                             marker_ranges: [
-                               Gitlab::MarkerRange.new(0, 11, mode: :addition),
-                               Gitlab::MarkerRange.new(28, 35, mode: :deletion),
-                               Gitlab::MarkerRange.new(36, 41, mode: :addition)
-                             ] },
+              marker_ranges: [
+                Gitlab::MarkerRange.new(0, 11, mode: :addition),
+                Gitlab::MarkerRange.new(28, 35, mode: :deletion),
+                Gitlab::MarkerRange.new(36, 41, mode: :addition)
+              ] },
 
             { index: 6, old_pos: 51, new_pos: 51, text: '', type: nil, marker_ranges: [] }
           ]
diff --git a/spec/lib/marginalia_spec.rb b/spec/lib/marginalia_spec.rb
index 59add4e8347d2168fe96c4f70a0eaee091d3107c..5f405e71d79d93a1f58e445f53ca502e543c300d 100644
--- a/spec/lib/marginalia_spec.rb
+++ b/spec/lib/marginalia_spec.rb
@@ -45,8 +45,8 @@ def first_user
 
     let(:component_map) do
       {
-        "application"    => "test",
-        "endpoint_id"    => "MarginaliaTestController#first_user",
+        "application" => "test",
+        "endpoint_id" => "MarginaliaTestController#first_user",
         "correlation_id" => correlation_id,
         "db_config_name" => "main"
       }
@@ -62,8 +62,8 @@ def first_user
       let(:recorded) { ActiveRecord::QueryRecorder.new { make_request(correlation_id, :first_ci_pipeline) } }
       let(:component_map) do
         {
-          "application"    => "test",
-          "endpoint_id"    => "MarginaliaTestController#first_ci_pipeline",
+          "application" => "test",
+          "endpoint_id" => "MarginaliaTestController#first_ci_pipeline",
           "correlation_id" => correlation_id,
           "db_config_name" => 'ci'
         }
@@ -104,10 +104,10 @@ def first_user
 
     let(:component_map) do
       {
-        "application"    => "sidekiq",
-        "endpoint_id"    => "MarginaliaTestJob",
+        "application" => "sidekiq",
+        "endpoint_id" => "MarginaliaTestJob",
         "correlation_id" => sidekiq_job['correlation_id'],
-        "jid"            => sidekiq_job['jid'],
+        "jid" => sidekiq_job['jid'],
         "db_config_name" => "main"
       }
     end
@@ -129,9 +129,9 @@ def first_user
 
       let(:component_map) do
         {
-          "application"    => "sidekiq",
-          "endpoint_id"    => "ActionMailer::MailDeliveryJob",
-          "jid"            => delivery_job.job_id,
+          "application" => "sidekiq",
+          "endpoint_id" => "ActionMailer::MailDeliveryJob",
+          "jid" => delivery_job.job_id,
           "db_config_name" => "main"
         }
       end
diff --git a/spec/lib/security/ci_configuration/sast_build_action_spec.rb b/spec/lib/security/ci_configuration/sast_build_action_spec.rb
index 611a886d25231e514a61e3209803fbd651d4022e..381ea60e7f59cbdf123a6ac974a03d5182c78f3c 100644
--- a/spec/lib/security/ci_configuration/sast_build_action_spec.rb
+++ b/spec/lib/security/ci_configuration/sast_build_action_spec.rb
@@ -33,12 +33,12 @@
     params.merge( { analyzers:
                     [
                       {
-                        name:  "bandit",
-                        enabled:  false
+                        name: "bandit",
+                        enabled: false
                       },
                       {
-                        name:  "brakeman",
-                        enabled:  true,
+                        name: "brakeman",
+                        enabled: true,
                         variables: [
                           { field: "SAST_BRAKEMAN_LEVEL",
                             default_value: "1",
@@ -46,8 +46,8 @@
                         ]
                       },
                       {
-                        name:  "flawfinder",
-                        enabled:  true,
+                        name: "flawfinder",
+                        enabled: true,
                         variables: [
                           { field: "SAST_FLAWFINDER_LEVEL",
                             default_value: "1",
@@ -62,12 +62,12 @@
     params.merge( { analyzers:
                     [
                       {
-                        name:  "flawfinder",
-                        enabled:  true
+                        name: "flawfinder",
+                        enabled: true
                       },
                       {
-                        name:  "brakeman",
-                        enabled:  true
+                        name: "brakeman",
+                        enabled: true
                       }
                     ] }
                 )
@@ -219,49 +219,49 @@
 
     def existing_gitlab_ci_and_template_array_without_sast
       { "stages" => %w(test security),
-       "variables" => { "RANDOM" => "make sure this persists", "SECURE_ANALYZERS_PREFIX" => "localhost:5000/analyzers" },
-       "sast" => { "variables" => { "SEARCH_MAX_DEPTH" => 1 }, "stage" => "security" },
-       "include" => [{ "template" => "existing.yml" }] }
+        "variables" => { "RANDOM" => "make sure this persists", "SECURE_ANALYZERS_PREFIX" => "localhost:5000/analyzers" },
+        "sast" => { "variables" => { "SEARCH_MAX_DEPTH" => 1 }, "stage" => "security" },
+        "include" => [{ "template" => "existing.yml" }] }
     end
 
     def existing_gitlab_ci_and_single_template_with_sast_and_default_stage
       { "stages" => %w(test),
-       "variables" => { "SECURE_ANALYZERS_PREFIX" => "localhost:5000/analyzers" },
-       "sast" => { "variables" => { "SEARCH_MAX_DEPTH" => 1 }, "stage" => "test" },
-       "include" => { "template" => "Security/SAST.gitlab-ci.yml" } }
+        "variables" => { "SECURE_ANALYZERS_PREFIX" => "localhost:5000/analyzers" },
+        "sast" => { "variables" => { "SEARCH_MAX_DEPTH" => 1 }, "stage" => "test" },
+        "include" => { "template" => "Security/SAST.gitlab-ci.yml" } }
     end
 
     def existing_gitlab_ci_and_single_template_without_sast
       { "stages" => %w(test security),
-       "variables" => { "RANDOM" => "make sure this persists", "SECURE_ANALYZERS_PREFIX" => "localhost:5000/analyzers" },
-       "sast" => { "variables" => { "SEARCH_MAX_DEPTH" => 1 }, "stage" => "security" },
-       "include" => { "template" => "existing.yml" } }
+        "variables" => { "RANDOM" => "make sure this persists", "SECURE_ANALYZERS_PREFIX" => "localhost:5000/analyzers" },
+        "sast" => { "variables" => { "SEARCH_MAX_DEPTH" => 1 }, "stage" => "security" },
+        "include" => { "template" => "existing.yml" } }
     end
 
     def existing_gitlab_ci_with_no_variables
       { "stages" => %w(test security),
-       "sast" => { "variables" => { "SEARCH_MAX_DEPTH" => 1 }, "stage" => "security" },
-       "include" => [{ "template" => "Security/SAST.gitlab-ci.yml" }] }
+        "sast" => { "variables" => { "SEARCH_MAX_DEPTH" => 1 }, "stage" => "security" },
+        "include" => [{ "template" => "Security/SAST.gitlab-ci.yml" }] }
     end
 
     def existing_gitlab_ci_with_no_sast_section
       { "stages" => %w(test security),
-       "variables" => { "RANDOM" => "make sure this persists", "SECURE_ANALYZERS_PREFIX" => "localhost:5000/analyzers" },
-       "include" => [{ "template" => "Security/SAST.gitlab-ci.yml" }] }
+        "variables" => { "RANDOM" => "make sure this persists", "SECURE_ANALYZERS_PREFIX" => "localhost:5000/analyzers" },
+        "include" => [{ "template" => "Security/SAST.gitlab-ci.yml" }] }
     end
 
     def existing_gitlab_ci_with_no_sast_variables
       { "stages" => %w(test security),
-       "variables" => { "RANDOM" => "make sure this persists", "SECURE_ANALYZERS_PREFIX" => "localhost:5000/analyzers" },
-       "sast" => { "stage" => "security" },
-       "include" => [{ "template" => "Security/SAST.gitlab-ci.yml" }] }
+        "variables" => { "RANDOM" => "make sure this persists", "SECURE_ANALYZERS_PREFIX" => "localhost:5000/analyzers" },
+        "sast" => { "stage" => "security" },
+        "include" => [{ "template" => "Security/SAST.gitlab-ci.yml" }] }
     end
 
     def existing_gitlab_ci
       { "stages" => %w(test security),
-       "variables" => { "RANDOM" => "make sure this persists", "SECURE_ANALYZERS_PREFIX" => "bad_prefix" },
-       "sast" => { "variables" => { "SEARCH_MAX_DEPTH" => 1 }, "stage" => "security" },
-       "include" => [{ "template" => "Security/SAST.gitlab-ci.yml" }] }
+        "variables" => { "RANDOM" => "make sure this persists", "SECURE_ANALYZERS_PREFIX" => "bad_prefix" },
+        "sast" => { "variables" => { "SEARCH_MAX_DEPTH" => 1 }, "stage" => "security" },
+        "include" => [{ "template" => "Security/SAST.gitlab-ci.yml" }] }
     end
   end
 
diff --git a/spec/mailers/emails/pipelines_spec.rb b/spec/mailers/emails/pipelines_spec.rb
index 3a2eb105964c9ded25a1e273bbf6e8048015b2d8..1ac989cc46b1e76f957bbf31618337e4c113f9ed 100644
--- a/spec/mailers/emails/pipelines_spec.rb
+++ b/spec/mailers/emails/pipelines_spec.rb
@@ -26,7 +26,7 @@
 
       let!(:merge_request) do
         create(:merge_request, source_branch: 'master', target_branch: 'feature',
-          source_project: project, target_project: project)
+                               source_project: project, target_project: project)
       end
 
       it 'has correct information that there is no merge request link' do
@@ -56,7 +56,7 @@
     context 'when branch pipeline is set to a merge request as a head pipeline' do
       let(:pipeline) do
         create(:ci_pipeline, project: project, ref: ref, sha: sha,
-          merge_requests_as_head_pipeline: [merge_request])
+                             merge_requests_as_head_pipeline: [merge_request])
       end
 
       let(:merge_request) do
diff --git a/spec/migrations/20210804150320_create_base_work_item_types_spec.rb b/spec/migrations/20210804150320_create_base_work_item_types_spec.rb
index 6df8e1b2ebf0e409e0ff9ae339ae4b730d26f1a1..ae510826fe13e283fe50ac641af5fbca32a33d11 100644
--- a/spec/migrations/20210804150320_create_base_work_item_types_spec.rb
+++ b/spec/migrations/20210804150320_create_base_work_item_types_spec.rb
@@ -10,9 +10,9 @@
 
   let(:base_types) do
     {
-      issue:       0,
-      incident:    1,
-      test_case:   2,
+      issue: 0,
+      incident: 1,
+      test_case: 2,
       requirement: 3
     }
   end
diff --git a/spec/migrations/20210831203408_upsert_base_work_item_types_spec.rb b/spec/migrations/20210831203408_upsert_base_work_item_types_spec.rb
index 1957a973ee1249bf6033e386a47d53e853668c7a..552602983d9fc63f810054fadba325783595212b 100644
--- a/spec/migrations/20210831203408_upsert_base_work_item_types_spec.rb
+++ b/spec/migrations/20210831203408_upsert_base_work_item_types_spec.rb
@@ -10,9 +10,9 @@
 
   let(:base_types) do
     {
-      issue:       0,
-      incident:    1,
-      test_case:   2,
+      issue: 0,
+      incident: 1,
+      test_case: 2,
       requirement: 3
     }
   end
diff --git a/spec/migrations/20211117084814_migrate_remaining_u2f_registrations_spec.rb b/spec/migrations/20211117084814_migrate_remaining_u2f_registrations_spec.rb
index 6a82ed016af2ddf68f674d868e56809d06adc2cd..ef6dd94d9e35971889ee3a4c764f1152ae4c2945 100644
--- a/spec/migrations/20211117084814_migrate_remaining_u2f_registrations_spec.rb
+++ b/spec/migrations/20211117084814_migrate_remaining_u2f_registrations_spec.rb
@@ -33,11 +33,11 @@ def create_u2f_registration(id, name, public_key = nil)
     device = U2F::FakeU2F.new(FFaker::BaconIpsum.characters(5), { key_handle: SecureRandom.random_bytes(255) })
     public_key ||= Base64.strict_encode64(device.origin_public_key_raw)
     u2f_registrations.create!({ id: id,
-                               certificate: Base64.strict_encode64(device.cert_raw),
-                               key_handle: U2F.urlsafe_encode64(device.key_handle_raw),
-                               public_key: public_key,
-                               counter: 5,
-                               name: name,
-                               user_id: user.id })
+                                certificate: Base64.strict_encode64(device.cert_raw),
+                                key_handle: U2F.urlsafe_encode64(device.key_handle_raw),
+                                public_key: public_key,
+                                counter: 5,
+                                name: name,
+                                user_id: user.id })
   end
 end
diff --git a/spec/migrations/20211126204445_add_task_to_work_item_types_spec.rb b/spec/migrations/20211126204445_add_task_to_work_item_types_spec.rb
index b80e4703f0755c104adeabf5c41bc715371887e8..34a6e2fdd1259e6e44a416609ee6fb029d61243c 100644
--- a/spec/migrations/20211126204445_add_task_to_work_item_types_spec.rb
+++ b/spec/migrations/20211126204445_add_task_to_work_item_types_spec.rb
@@ -10,11 +10,11 @@
 
   let(:base_types) do
     {
-      issue:       0,
-      incident:    1,
-      test_case:   2,
+      issue: 0,
+      incident: 1,
+      test_case: 2,
       requirement: 3,
-      task:        4
+      task: 4
     }
   end
 
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index e4c0e81cc1be1f54dfcfa0c6b3c8c2ec7458447d..6fbff95f50495a9bc0b2484122c21115764ed2b4 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -1375,32 +1375,11 @@ def create_build(name, status)
       let(:pipeline) { build(:ci_empty_pipeline, :created) }
 
       before do
-        create(:ci_stage, project: project,
-                                 pipeline: pipeline,
-                                 position: 4,
-                                 name: 'deploy')
-
-        create(:ci_build, project: project,
-                          pipeline: pipeline,
-                          stage: 'test',
-                          stage_idx: 3,
-                          name: 'test')
-
-        create(:ci_build, project: project,
-                          pipeline: pipeline,
-                          stage: 'build',
-                          stage_idx: 2,
-                          name: 'build')
-
-        create(:ci_stage, project: project,
-                                 pipeline: pipeline,
-                                 position: 1,
-                                 name: 'sanity')
-
-        create(:ci_stage, project: project,
-                                 pipeline: pipeline,
-                                 position: 5,
-                                 name: 'cleanup')
+        create(:ci_stage, project: project, pipeline: pipeline, position: 4, name: 'deploy')
+        create(:ci_build, project: project, pipeline: pipeline, stage: 'test', stage_idx: 3, name: 'test')
+        create(:ci_build, project: project, pipeline: pipeline, stage: 'build', stage_idx: 2, name: 'build')
+        create(:ci_stage, project: project, pipeline: pipeline, position: 1, name: 'sanity')
+        create(:ci_stage, project: project, pipeline: pipeline, position: 5, name: 'cleanup')
       end
 
       subject { pipeline.stages }
@@ -1649,9 +1628,8 @@ def create_build(name, status)
       context 'when auto merge is enabled' do
         let_it_be_with_reload(:merge_request) { create(:merge_request, :merge_when_pipeline_succeeds) }
         let_it_be_with_reload(:pipeline) do
-          create(:ci_pipeline, :running, project: merge_request.source_project,
-                                        ref: merge_request.source_branch,
-                                        sha: merge_request.diff_head_sha)
+          create(:ci_pipeline, :running,
+            project: merge_request.source_project, ref: merge_request.source_branch, sha: merge_request.diff_head_sha)
         end
 
         before_all do
diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb
index 78d4d9de84efd0176a1c01700e137e34c0a68c7c..e0e17ee5e8971af866bad1cc37706c093e0384e4 100644
--- a/spec/models/commit_status_spec.rb
+++ b/spec/models/commit_status_spec.rb
@@ -836,17 +836,11 @@ def create_status(**opts)
 
     context 'when commit status does not have stage but it exists' do
       let!(:stage) do
-        create(:ci_stage, project: project,
-                                 pipeline: pipeline,
-                                 name: 'test')
+        create(:ci_stage, project: project, pipeline: pipeline, name: 'test')
       end
 
       let(:commit_status) do
-        create(:commit_status, project: project,
-                               pipeline: pipeline,
-                               name: 'rspec',
-                               stage: 'test',
-                               status: :success)
+        create(:commit_status, project: project, pipeline: pipeline, name: 'rspec', stage: 'test', status: :success)
       end
 
       it 'uses existing stage', :sidekiq_might_not_need_inline do
diff --git a/spec/presenters/clusters/cluster_presenter_spec.rb b/spec/presenters/clusters/cluster_presenter_spec.rb
index 7349f444fac36b7f94c1eca9adc26785995f2f4b..755f1ea607876c5a892f4419273cf4833229ca95 100644
--- a/spec/presenters/clusters/cluster_presenter_spec.rb
+++ b/spec/presenters/clusters/cluster_presenter_spec.rb
@@ -119,18 +119,20 @@
       subject { cluster_presenter.health_data(clusterable_presenter) }
 
       it do
-        is_expected.to include('clusters-path': clusterable_presenter.index_path,
-                             'dashboard-endpoint': clusterable_presenter.metrics_dashboard_path(cluster),
-                             'documentation-path': help_page_path('user/infrastructure/clusters/manage/clusters_health'),
-                             'add-dashboard-documentation-path': help_page_path('operations/metrics/dashboards/index.md', anchor: 'add-a-new-dashboard-to-your-project'),
-                             'empty-getting-started-svg-path': match_asset_path('/assets/illustrations/monitoring/getting_started.svg'),
-                             'empty-loading-svg-path': match_asset_path('/assets/illustrations/monitoring/loading.svg'),
-                             'empty-no-data-svg-path': match_asset_path('/assets/illustrations/monitoring/no_data.svg'),
-                             'empty-no-data-small-svg-path': match_asset_path('illustrations/chart-empty-state-small.svg'),
-                             'empty-unable-to-connect-svg-path': match_asset_path('/assets/illustrations/monitoring/unable_to_connect.svg'),
-                             'settings-path': '',
-                             'project-path': '',
-                             'tags-path': '')
+        is_expected.to include(
+          'clusters-path': clusterable_presenter.index_path,
+          'dashboard-endpoint': clusterable_presenter.metrics_dashboard_path(cluster),
+          'documentation-path': help_page_path('user/infrastructure/clusters/manage/clusters_health'),
+          'add-dashboard-documentation-path': help_page_path('operations/metrics/dashboards/index.md', anchor: 'add-a-new-dashboard-to-your-project'),
+          'empty-getting-started-svg-path': match_asset_path('/assets/illustrations/monitoring/getting_started.svg'),
+          'empty-loading-svg-path': match_asset_path('/assets/illustrations/monitoring/loading.svg'),
+          'empty-no-data-svg-path': match_asset_path('/assets/illustrations/monitoring/no_data.svg'),
+          'empty-no-data-small-svg-path': match_asset_path('illustrations/chart-empty-state-small.svg'),
+          'empty-unable-to-connect-svg-path': match_asset_path('/assets/illustrations/monitoring/unable_to_connect.svg'),
+          'settings-path': '',
+          'project-path': '',
+          'tags-path': ''
+        )
       end
     end