diff --git a/.rubocop.yml b/.rubocop.yml
index b453f4a1dc22957772a7d51a392af943a7a3afa4..cd120e8581c7cd2137d48c668459b4e0dcd90d78 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -413,6 +413,9 @@ Style/SpaceBeforeComment:
 Style/SpaceBeforeSemicolon:
   Enabled: true
 
+Style/SpaceInsideBrackets:
+  Enabled: true
+
 # Use spaces inside hash literal braces - or don't.
 Style/SpaceInsideHashLiteralBraces:
   Enabled: true
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 8d75c99d5a61d54af1843d3e37de777ca91a2178..4da79899831f1409eb982e71141f3f49141a0cee 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -729,11 +729,6 @@ Style/SpaceInLambdaLiteral:
 Style/SpaceInsideBlockBraces:
   Enabled: false
 
-# Offense count: 120
-# Cop supports --auto-correct.
-Style/SpaceInsideBrackets:
-  Enabled: false
-
 # Offense count: 90
 # Cop supports --auto-correct.
 Style/SpaceInsideParens:
diff --git a/app/helpers/submodule_helper.rb b/app/helpers/submodule_helper.rb
index 9a748aaaf338104131131944c686c6c2142bbdd6..97d8cde4b3d0e692c1b091de84db451fa5611b41 100644
--- a/app/helpers/submodule_helper.rb
+++ b/app/helpers/submodule_helper.rb
@@ -37,8 +37,8 @@ module SubmoduleHelper
   end
 
   def self_url?(url, namespace, project)
-    return true if url == [ Gitlab.config.gitlab.url, '/', namespace, '/',
-                            project, '.git' ].join('')
+    return true if url == [Gitlab.config.gitlab.url, '/', namespace, '/',
+                            project, '.git'].join('')
     url == gitlab_shell.url_to_repo([namespace, '/', project].join(''))
   end
 
@@ -48,8 +48,8 @@ module SubmoduleHelper
   end
 
   def standard_links(host, namespace, project, commit)
-    base = [ 'https://', host, '/', namespace, '/', project ].join('')
-    [base, [ base, '/tree/', commit ].join('')]
+    base = ['https://', host, '/', namespace, '/', project].join('')
+    [base, [base, '/tree/', commit].join('')]
   end
 
   def relative_self_links(url, commit)
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index c9c6bd24d75e08597aef6112b07a2cf0db7fdf9e..e07ae9d166087ce3ebd22b0c9bf2551a82e6243c 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -68,7 +68,7 @@ module Issuable
 
     scope :without_label, -> { joins("LEFT OUTER JOIN label_links ON label_links.target_type = '#{name}' AND label_links.target_id = #{table_name}.id").where(label_links: { id: nil }) }
     scope :join_project, -> { joins(:project) }
-    scope :inc_notes_with_associations, -> { includes(notes: [ :project, :author, :award_emoji ]) }
+    scope :inc_notes_with_associations, -> { includes(notes: [:project, :author, :award_emoji]) }
     scope :references_project, -> { references(:project) }
     scope :non_archived, -> { join_project.where(projects: { archived: false }) }
 
diff --git a/app/models/concerns/reactive_service.rb b/app/models/concerns/reactive_service.rb
index e1f868a299bbb820b44092042f6500b8d23dffdb..713246039c1319ac2649ca9c4d0420d8136692bf 100644
--- a/app/models/concerns/reactive_service.rb
+++ b/app/models/concerns/reactive_service.rb
@@ -5,6 +5,6 @@ module ReactiveService
     include ReactiveCaching
 
     # Default cache key: class name + project_id
-    self.reactive_cache_key = ->(service) { [ service.class.model_name.singular, service.project_id ] }
+    self.reactive_cache_key = ->(service) { [service.class.model_name.singular, service.project_id] }
   end
 end
diff --git a/app/models/project_services/kubernetes_service.rb b/app/models/project_services/kubernetes_service.rb
index f2f019c43bb46f5b6a4d112098683351901fc3e8..eb5019c08b52b1979d718d84a7f28dccc9a0b212 100644
--- a/app/models/project_services/kubernetes_service.rb
+++ b/app/models/project_services/kubernetes_service.rb
@@ -3,7 +3,7 @@ class KubernetesService < DeploymentService
   include Gitlab::Kubernetes
   include ReactiveCaching
 
-  self.reactive_cache_key = ->(service) { [ service.class.model_name.singular, service.project_id ] }
+  self.reactive_cache_key = ->(service) { [service.class.model_name.singular, service.project_id] }
 
   # Namespace defaults to the project path, but can be overridden in case that
   # is an invalid or inappropriate name
@@ -167,7 +167,7 @@ class KubernetesService < DeploymentService
     url = URI.parse(api_url)
     prefix = url.path.sub(%r{/+\z}, '')
 
-    url.path = [ prefix, *parts ].join("/")
+    url.path = [prefix, *parts].join("/")
 
     url.to_s
   end
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 3f716dd8833dd4b21983b4709fd03bfb249be38c..680deee6d460b9e4a303c9067726f77ae09bcbcd 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -19,7 +19,7 @@ class Settings < Settingslogic
       else
         custom_port = ":#{gitlab.port}"
       end
-      [ gitlab.protocol,
+      [gitlab.protocol,
         "://",
         gitlab.host,
         custom_port,
@@ -80,7 +80,7 @@ class Settings < Settingslogic
 
     def base_url(config)
       custom_port = on_standard_port?(config) ? nil : ":#{config.port}"
-      [ config.protocol,
+      [config.protocol,
         "://",
         config.host,
         custom_port
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 738dbeefc118142ee97b6f34b83977886d62efc0..3b1317030bcc7ae873809fb68af6ba7f0ce15c8b 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -24,7 +24,7 @@ Devise.setup do |config|
   # session. If you need permissions, you should implement that in a before filter.
   # You can also supply a hash where the value is a boolean determining whether
   # or not authentication should be aborted when the value is not present.
-  config.authentication_keys = [ :login ]
+  config.authentication_keys = [:login]
 
   # Configure parameters from the request object used for authentication. Each entry
   # given should be a request method and it will automatically be passed to the
@@ -36,12 +36,12 @@ Devise.setup do |config|
   # Configure which authentication keys should be case-insensitive.
   # These keys will be downcased upon creating or modifying a user and when used
   # to authenticate or find a user. Default is :email.
-  config.case_insensitive_keys = [ :email ]
+  config.case_insensitive_keys = [:email]
 
   # Configure which authentication keys should have whitespace stripped.
   # These keys will have whitespace before and after removed upon creating or
   # modifying a user and when used to authenticate or find a user. Default is :email.
-  config.strip_whitespace_keys = [ :email ]
+  config.strip_whitespace_keys = [:email]
 
   # Tell if authentication through request.params is enabled. True by default.
   # config.params_authenticatable = true
@@ -124,7 +124,7 @@ Devise.setup do |config|
   config.lock_strategy = :failed_attempts
 
   # Defines which key will be used when locking and unlocking an account
-  config.unlock_keys = [ :email ]
+  config.unlock_keys = [:email]
 
   # Defines which strategy will be used to unlock an account.
   # :email = Sends an unlock link to the user email
diff --git a/config/initializers/trusted_proxies.rb b/config/initializers/trusted_proxies.rb
index cd869657c530f7f0b6c1b76e45d25a3d0fedd973..fc4f02453d77daa25c77586fead3db1bb239bb4d 100644
--- a/config/initializers/trusted_proxies.rb
+++ b/config/initializers/trusted_proxies.rb
@@ -21,4 +21,4 @@ gitlab_trusted_proxies = Array(Gitlab.config.gitlab.trusted_proxies).map do |pro
 end.compact
 
 Rails.application.config.action_dispatch.trusted_proxies = (
-  [ '127.0.0.1', '::1' ] + gitlab_trusted_proxies)
+  ['127.0.0.1', '::1'] + gitlab_trusted_proxies)
diff --git a/lib/api/api_guard.rb b/lib/api/api_guard.rb
index dad588debf0c12bf9392a9fc2946649a32ea2e06..a955d17c9d1ecdf4a0c72bfe845aa7036522f15b 100644
--- a/lib/api/api_guard.rb
+++ b/lib/api/api_guard.rb
@@ -114,7 +114,7 @@ module API
       private
 
       def install_error_responders(base)
-        error_classes = [ MissingTokenError, TokenNotFoundError,
+        error_classes = [MissingTokenError, TokenNotFoundError,
                           ExpiredError, RevokedError, InsufficientScopeError]
 
         base.send :rescue_from, *error_classes, oauth2_bearer_token_error_handler
diff --git a/lib/api/award_emoji.rb b/lib/api/award_emoji.rb
index a5394cf61d5ede0bfcddef39d3ffd3060e375abc..f54ba232608f7571ab1f1971117709b335a4f719 100644
--- a/lib/api/award_emoji.rb
+++ b/lib/api/award_emoji.rb
@@ -15,7 +15,7 @@ module API
           requires :"#{awardable_id_string}", type: Integer, desc: "The ID of an Issue, Merge Request or Snippet"
         end
 
-        [ ":id/#{awardable_string}/:#{awardable_id_string}/award_emoji",
+        [":id/#{awardable_string}/:#{awardable_id_string}/award_emoji",
           ":id/#{awardable_string}/:#{awardable_id_string}/notes/:note_id/award_emoji"
         ].each do |endpoint|
 
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index f1cb1b22143f4d1ef12cfa7b9d11d0e99711342c..b2ea2ab0b99781e0299b263261b1b6cf66f21142 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -19,7 +19,7 @@ module API
         optional :visibility_level, type: Integer, values: [
           Gitlab::VisibilityLevel::PRIVATE,
           Gitlab::VisibilityLevel::INTERNAL,
-          Gitlab::VisibilityLevel::PUBLIC ], desc: 'Create a public project. The same as visibility_level = 20.'
+          Gitlab::VisibilityLevel::PUBLIC], desc: 'Create a public project. The same as visibility_level = 20.'
         optional :public_builds, type: Boolean, desc: 'Perform public builds'
         optional :request_access_enabled, type: Boolean, desc: 'Allow users to request member access'
         optional :only_allow_merge_if_build_succeeds, type: Boolean, desc: 'Only allow to merge if builds succeed'
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb
index bfda6f45b0a8d5697bab88b3d37d1a909aa901ce..361667801492d537f90777ca1622a7919c217dd1 100644
--- a/lib/api/repositories.rb
+++ b/lib/api/repositories.rb
@@ -45,7 +45,7 @@ module API
         requires :sha, type: String, desc: 'The commit, branch name, or tag name'
         requires :filepath, type: String, desc: 'The path to the file to display'
       end
-      get [ ":id/repository/blobs/:sha", ":id/repository/commits/:sha/blob" ] do
+      get [":id/repository/blobs/:sha", ":id/repository/commits/:sha/blob"] do
         repo = user_project.repository
 
         commit = repo.commit(params[:sha])
diff --git a/lib/api/v3/projects.rb b/lib/api/v3/projects.rb
index 4bc836f2a3a5e27bed46411b229c3b92c439a3fa..f84f2ce5d427df7c87b1ed5c0e41302da40da002 100644
--- a/lib/api/v3/projects.rb
+++ b/lib/api/v3/projects.rb
@@ -20,7 +20,7 @@ module API
           optional :visibility_level, type: Integer, values: [
             Gitlab::VisibilityLevel::PRIVATE,
             Gitlab::VisibilityLevel::INTERNAL,
-            Gitlab::VisibilityLevel::PUBLIC ], desc: 'Create a public project. The same as visibility_level = 20.'
+            Gitlab::VisibilityLevel::PUBLIC], desc: 'Create a public project. The same as visibility_level = 20.'
           optional :public_builds, type: Boolean, desc: 'Perform public builds'
           optional :request_access_enabled, type: Boolean, desc: 'Allow users to request member access'
           optional :only_allow_merge_if_build_succeeds, type: Boolean, desc: 'Only allow to merge if builds succeed'
diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb
index e1e5658242536064d0691af53b8774fc55c6337c..372546e92a51393aea1573595d8e6a2bcac25931 100644
--- a/spec/helpers/issues_helper_spec.rb
+++ b/spec/helpers/issues_helper_spec.rb
@@ -55,7 +55,7 @@ describe IssuesHelper do
   describe "merge_requests_sentence" do
     subject { merge_requests_sentence(merge_requests)}
     let(:merge_requests) do
-      [ build(:merge_request, iid: 1), build(:merge_request, iid: 2),
+      [build(:merge_request, iid: 1), build(:merge_request, iid: 2),
         build(:merge_request, iid: 3)]
     end
 
diff --git a/spec/helpers/submodule_helper_spec.rb b/spec/helpers/submodule_helper_spec.rb
index 4da1569e59f0dbe25b0b7dffae5adc3ec740f73a..28b8def331d63eeebf7417b2c7bbb48e754f294a 100644
--- a/spec/helpers/submodule_helper_spec.rb
+++ b/spec/helpers/submodule_helper_spec.rb
@@ -20,97 +20,97 @@ describe SubmoduleHelper do
       it 'detects ssh on standard port' do
         allow(Gitlab.config.gitlab_shell).to receive(:ssh_port).and_return(22) # set this just to be sure
         allow(Gitlab.config.gitlab_shell).to receive(:ssh_path_prefix).and_return(Settings.send(:build_gitlab_shell_ssh_path_prefix))
-        stub_url([ config.user, '@', config.host, ':gitlab-org/gitlab-ce.git' ].join(''))
-        expect(submodule_links(submodule_item)).to eq([ namespace_project_path('gitlab-org', 'gitlab-ce'), namespace_project_tree_path('gitlab-org', 'gitlab-ce', 'hash') ])
+        stub_url([config.user, '@', config.host, ':gitlab-org/gitlab-ce.git'].join(''))
+        expect(submodule_links(submodule_item)).to eq([namespace_project_path('gitlab-org', 'gitlab-ce'), namespace_project_tree_path('gitlab-org', 'gitlab-ce', 'hash')])
       end
 
       it 'detects ssh on non-standard port' do
         allow(Gitlab.config.gitlab_shell).to receive(:ssh_port).and_return(2222)
         allow(Gitlab.config.gitlab_shell).to receive(:ssh_path_prefix).and_return(Settings.send(:build_gitlab_shell_ssh_path_prefix))
-        stub_url([ 'ssh://', config.user, '@', config.host, ':2222/gitlab-org/gitlab-ce.git' ].join(''))
-        expect(submodule_links(submodule_item)).to eq([ namespace_project_path('gitlab-org', 'gitlab-ce'), namespace_project_tree_path('gitlab-org', 'gitlab-ce', 'hash') ])
+        stub_url(['ssh://', config.user, '@', config.host, ':2222/gitlab-org/gitlab-ce.git'].join(''))
+        expect(submodule_links(submodule_item)).to eq([namespace_project_path('gitlab-org', 'gitlab-ce'), namespace_project_tree_path('gitlab-org', 'gitlab-ce', 'hash')])
       end
 
       it 'detects http on standard port' do
         allow(Gitlab.config.gitlab).to receive(:port).and_return(80)
         allow(Gitlab.config.gitlab).to receive(:url).and_return(Settings.send(:build_gitlab_url))
-        stub_url([ 'http://', config.host, '/gitlab-org/gitlab-ce.git' ].join(''))
-        expect(submodule_links(submodule_item)).to eq([ namespace_project_path('gitlab-org', 'gitlab-ce'), namespace_project_tree_path('gitlab-org', 'gitlab-ce', 'hash') ])
+        stub_url(['http://', config.host, '/gitlab-org/gitlab-ce.git'].join(''))
+        expect(submodule_links(submodule_item)).to eq([namespace_project_path('gitlab-org', 'gitlab-ce'), namespace_project_tree_path('gitlab-org', 'gitlab-ce', 'hash')])
       end
 
       it 'detects http on non-standard port' do
         allow(Gitlab.config.gitlab).to receive(:port).and_return(3000)
         allow(Gitlab.config.gitlab).to receive(:url).and_return(Settings.send(:build_gitlab_url))
-        stub_url([ 'http://', config.host, ':3000/gitlab-org/gitlab-ce.git' ].join(''))
-        expect(submodule_links(submodule_item)).to eq([ namespace_project_path('gitlab-org', 'gitlab-ce'), namespace_project_tree_path('gitlab-org', 'gitlab-ce', 'hash') ])
+        stub_url(['http://', config.host, ':3000/gitlab-org/gitlab-ce.git'].join(''))
+        expect(submodule_links(submodule_item)).to eq([namespace_project_path('gitlab-org', 'gitlab-ce'), namespace_project_tree_path('gitlab-org', 'gitlab-ce', 'hash')])
       end
 
       it 'works with relative_url_root' do
         allow(Gitlab.config.gitlab).to receive(:port).and_return(80) # set this just to be sure
         allow(Gitlab.config.gitlab).to receive(:relative_url_root).and_return('/gitlab/root')
         allow(Gitlab.config.gitlab).to receive(:url).and_return(Settings.send(:build_gitlab_url))
-        stub_url([ 'http://', config.host, '/gitlab/root/gitlab-org/gitlab-ce.git' ].join(''))
-        expect(submodule_links(submodule_item)).to eq([ namespace_project_path('gitlab-org', 'gitlab-ce'), namespace_project_tree_path('gitlab-org', 'gitlab-ce', 'hash') ])
+        stub_url(['http://', config.host, '/gitlab/root/gitlab-org/gitlab-ce.git'].join(''))
+        expect(submodule_links(submodule_item)).to eq([namespace_project_path('gitlab-org', 'gitlab-ce'), namespace_project_tree_path('gitlab-org', 'gitlab-ce', 'hash')])
       end
     end
 
     context 'submodule on github.com' do
       it 'detects ssh' do
         stub_url('git@github.com:gitlab-org/gitlab-ce.git')
-        expect(submodule_links(submodule_item)).to eq([ 'https://github.com/gitlab-org/gitlab-ce', 'https://github.com/gitlab-org/gitlab-ce/tree/hash' ])
+        expect(submodule_links(submodule_item)).to eq(['https://github.com/gitlab-org/gitlab-ce', 'https://github.com/gitlab-org/gitlab-ce/tree/hash'])
       end
 
       it 'detects http' do
         stub_url('http://github.com/gitlab-org/gitlab-ce.git')
-        expect(submodule_links(submodule_item)).to eq([ 'https://github.com/gitlab-org/gitlab-ce', 'https://github.com/gitlab-org/gitlab-ce/tree/hash' ])
+        expect(submodule_links(submodule_item)).to eq(['https://github.com/gitlab-org/gitlab-ce', 'https://github.com/gitlab-org/gitlab-ce/tree/hash'])
       end
 
       it 'detects https' do
         stub_url('https://github.com/gitlab-org/gitlab-ce.git')
-        expect(submodule_links(submodule_item)).to eq([ 'https://github.com/gitlab-org/gitlab-ce', 'https://github.com/gitlab-org/gitlab-ce/tree/hash' ])
+        expect(submodule_links(submodule_item)).to eq(['https://github.com/gitlab-org/gitlab-ce', 'https://github.com/gitlab-org/gitlab-ce/tree/hash'])
       end
 
       it 'returns original with non-standard url' do
         stub_url('http://github.com/gitlab-org/gitlab-ce')
-        expect(submodule_links(submodule_item)).to eq([ repo.submodule_url_for, nil ])
+        expect(submodule_links(submodule_item)).to eq([repo.submodule_url_for, nil])
 
         stub_url('http://github.com/another/gitlab-org/gitlab-ce.git')
-        expect(submodule_links(submodule_item)).to eq([ repo.submodule_url_for, nil ])
+        expect(submodule_links(submodule_item)).to eq([repo.submodule_url_for, nil])
       end
     end
 
     context 'submodule on gitlab.com' do
       it 'detects ssh' do
         stub_url('git@gitlab.com:gitlab-org/gitlab-ce.git')
-        expect(submodule_links(submodule_item)).to eq([ 'https://gitlab.com/gitlab-org/gitlab-ce', 'https://gitlab.com/gitlab-org/gitlab-ce/tree/hash' ])
+        expect(submodule_links(submodule_item)).to eq(['https://gitlab.com/gitlab-org/gitlab-ce', 'https://gitlab.com/gitlab-org/gitlab-ce/tree/hash'])
       end
 
       it 'detects http' do
         stub_url('http://gitlab.com/gitlab-org/gitlab-ce.git')
-        expect(submodule_links(submodule_item)).to eq([ 'https://gitlab.com/gitlab-org/gitlab-ce', 'https://gitlab.com/gitlab-org/gitlab-ce/tree/hash' ])
+        expect(submodule_links(submodule_item)).to eq(['https://gitlab.com/gitlab-org/gitlab-ce', 'https://gitlab.com/gitlab-org/gitlab-ce/tree/hash'])
       end
 
       it 'detects https' do
         stub_url('https://gitlab.com/gitlab-org/gitlab-ce.git')
-        expect(submodule_links(submodule_item)).to eq([ 'https://gitlab.com/gitlab-org/gitlab-ce', 'https://gitlab.com/gitlab-org/gitlab-ce/tree/hash' ])
+        expect(submodule_links(submodule_item)).to eq(['https://gitlab.com/gitlab-org/gitlab-ce', 'https://gitlab.com/gitlab-org/gitlab-ce/tree/hash'])
       end
 
       it 'returns original with non-standard url' do
         stub_url('http://gitlab.com/gitlab-org/gitlab-ce')
-        expect(submodule_links(submodule_item)).to eq([ repo.submodule_url_for, nil ])
+        expect(submodule_links(submodule_item)).to eq([repo.submodule_url_for, nil])
 
         stub_url('http://gitlab.com/another/gitlab-org/gitlab-ce.git')
-        expect(submodule_links(submodule_item)).to eq([ repo.submodule_url_for, nil ])
+        expect(submodule_links(submodule_item)).to eq([repo.submodule_url_for, nil])
       end
     end
 
     context 'submodule on unsupported' do
       it 'returns original' do
         stub_url('http://mygitserver.com/gitlab-org/gitlab-ce')
-        expect(submodule_links(submodule_item)).to eq([ repo.submodule_url_for, nil ])
+        expect(submodule_links(submodule_item)).to eq([repo.submodule_url_for, nil])
 
         stub_url('http://mygitserver.com/gitlab-org/gitlab-ce.git')
-        expect(submodule_links(submodule_item)).to eq([ repo.submodule_url_for, nil ])
+        expect(submodule_links(submodule_item)).to eq([repo.submodule_url_for, nil])
       end
     end
 
diff --git a/spec/initializers/trusted_proxies_spec.rb b/spec/initializers/trusted_proxies_spec.rb
index 290e47763eb286e69530d11f7928aa5a86900de5..ff8b8daa34798d16a67d086905dbf92606675ed6 100644
--- a/spec/initializers/trusted_proxies_spec.rb
+++ b/spec/initializers/trusted_proxies_spec.rb
@@ -27,7 +27,7 @@ describe 'trusted_proxies', lib: true do
 
   context 'with private IP ranges added' do
     before do
-      set_trusted_proxies([ "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16" ])
+      set_trusted_proxies(["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"])
     end
 
     it 'filters out private and local IPs' do
@@ -39,7 +39,7 @@ describe 'trusted_proxies', lib: true do
 
   context 'with proxy IP added' do
     before do
-      set_trusted_proxies([ "60.98.25.47" ])
+      set_trusted_proxies(["60.98.25.47"])
     end
 
     it 'filters out proxy IP' do
diff --git a/spec/lib/bitbucket/representation/repo_spec.rb b/spec/lib/bitbucket/representation/repo_spec.rb
index adcd978e1b3b6dffb74c3b2d80684f88bbdad34c..d92282301453a0b9c7cdd8169e4f6eda8967ee54 100644
--- a/spec/lib/bitbucket/representation/repo_spec.rb
+++ b/spec/lib/bitbucket/representation/repo_spec.rb
@@ -42,7 +42,7 @@ describe Bitbucket::Representation::Repo do
 
   describe '#clone_url' do
     it 'builds url' do
-      data = { 'links' => { 'clone' => [ { 'name' => 'https', 'href' => 'https://bibucket.org/test/test.git' }] } }
+      data = { 'links' => { 'clone' => [{ 'name' => 'https', 'href' => 'https://bibucket.org/test/test.git' }] } }
       expect(described_class.new(data).clone_url('abc')).to eq('https://x-token-auth:abc@bibucket.org/test/test.git')
     end
   end
diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
index ce31f8a843278b08010e0186d0941f0acdd5fc20..86eec3d63927645e0b016fc8dfb5e972e885234a 100644
--- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
@@ -580,7 +580,7 @@ module Ci
         context 'when syntax is incorrect' do
           context 'when variables defined but invalid' do
             let(:variables) do
-              [ 'VAR1', 'value1', 'VAR2', 'value2' ]
+              ['VAR1', 'value1', 'VAR2', 'value2']
             end
 
             it 'raises error' do
diff --git a/spec/lib/gitlab/ci/config/entry/key_spec.rb b/spec/lib/gitlab/ci/config/entry/key_spec.rb
index b1e563e0786a0679573e82f5485f3ee66c19d6e4..cd7b03ffb1106b1b7f97e2fd7622c9f7ef9762f5 100644
--- a/spec/lib/gitlab/ci/config/entry/key_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/key_spec.rb
@@ -21,7 +21,7 @@ describe Gitlab::Ci::Config::Entry::Key do
     end
 
     context 'when entry value is not correct' do
-      let(:config) { [ 'incorrect' ] }
+      let(:config) { ['incorrect'] }
 
       describe '#errors' do
         it 'saves errors' do
diff --git a/spec/lib/gitlab/ci/config/entry/paths_spec.rb b/spec/lib/gitlab/ci/config/entry/paths_spec.rb
index 52f595e4b67c876ea14a8561de6fdb11d1d5ffce..b0ac90f1d9417e32d55f33a4d4b953d154782d0f 100644
--- a/spec/lib/gitlab/ci/config/entry/paths_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/paths_spec.rb
@@ -21,7 +21,7 @@ describe Gitlab::Ci::Config::Entry::Paths do
     end
 
     context 'when entry value is not valid' do
-      let(:config) { [ 1 ] }
+      let(:config) { [1] }
 
       describe '#errors' do
         it 'saves errors' do
diff --git a/spec/lib/gitlab/ci/config/entry/variables_spec.rb b/spec/lib/gitlab/ci/config/entry/variables_spec.rb
index 60aa510b7465d78c36070a931c4a9d1387941e3d..c117f35c906ab07206796c9681c16e4ef6e27861 100644
--- a/spec/lib/gitlab/ci/config/entry/variables_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/variables_spec.rb
@@ -29,7 +29,7 @@ describe Gitlab::Ci::Config::Entry::Variables do
     end
 
     context 'when entry value is not correct' do
-      let(:config) { [ :VAR, 'test' ] }
+      let(:config) { [:VAR, 'test'] }
 
       describe '#errors' do
         it 'saves errors' do
diff --git a/spec/lib/gitlab/git/diff_collection_spec.rb b/spec/lib/gitlab/git/diff_collection_spec.rb
index 4fa72c565aece98a15cd5368521bf9c10acae903..47bdd7310d5c79c0d07af6b989c745e3f54f20b1 100644
--- a/spec/lib/gitlab/git/diff_collection_spec.rb
+++ b/spec/lib/gitlab/git/diff_collection_spec.rb
@@ -365,7 +365,7 @@ describe Gitlab::Git::DiffCollection, seed_helper: true do
         end
 
         context 'when go over safe limits on files' do
-          let(:iterator) { [ fake_diff(1, 1) ] * 4 }
+          let(:iterator) { [fake_diff(1, 1)] * 4 }
 
           before(:each) do
             stub_const('Gitlab::Git::DiffCollection::DEFAULT_LIMITS', { max_files: 2, max_lines: max_lines })
diff --git a/spec/lib/gitlab/o_auth/user_spec.rb b/spec/lib/gitlab/o_auth/user_spec.rb
index 8d9352350f09c2d6282fef87d7883cf2e88538ea..0575b95fd304ff2f0637efb6528e9b1393193191 100644
--- a/spec/lib/gitlab/o_auth/user_spec.rb
+++ b/spec/lib/gitlab/o_auth/user_spec.rb
@@ -151,7 +151,7 @@ describe Gitlab::OAuth::User, lib: true do
                 expect(gl_user.identities.length).to eql 2
                 identities_as_hash = gl_user.identities.map { |id| { provider: id.provider, extern_uid: id.extern_uid } }
                 expect(identities_as_hash).to match_array(
-                  [ { provider: 'ldapmain', extern_uid: 'uid=user1,ou=People,dc=example' },
+                  [{ provider: 'ldapmain', extern_uid: 'uid=user1,ou=People,dc=example' },
                     { provider: 'twitter', extern_uid: uid }
                   ])
               end
@@ -170,7 +170,7 @@ describe Gitlab::OAuth::User, lib: true do
                 expect(gl_user.identities.length).to eql 2
                 identities_as_hash = gl_user.identities.map { |id| { provider: id.provider, extern_uid: id.extern_uid } }
                 expect(identities_as_hash).to match_array(
-                  [ { provider: 'ldapmain', extern_uid: 'uid=user1,ou=People,dc=example' },
+                  [{ provider: 'ldapmain', extern_uid: 'uid=user1,ou=People,dc=example' },
                     { provider: 'twitter', extern_uid: uid }
                   ])
               end
diff --git a/spec/lib/gitlab/saml/user_spec.rb b/spec/lib/gitlab/saml/user_spec.rb
index 02c139f1a0d131e9f4eeae8cd0850b0dfe1dd732..844b94466031123cc08a57d2633cb5be01f86ffa 100644
--- a/spec/lib/gitlab/saml/user_spec.rb
+++ b/spec/lib/gitlab/saml/user_spec.rb
@@ -157,7 +157,7 @@ describe Gitlab::Saml::User, lib: true do
                 expect(gl_user.email).to eql 'john@mail.com'
                 expect(gl_user.identities.length).to eql 2
                 identities_as_hash = gl_user.identities.map { |id| { provider: id.provider, extern_uid: id.extern_uid } }
-                expect(identities_as_hash).to match_array([ { provider: 'ldapmain', extern_uid: 'uid=user1,ou=People,dc=example' },
+                expect(identities_as_hash).to match_array([{ provider: 'ldapmain', extern_uid: 'uid=user1,ou=People,dc=example' },
                                                             { provider: 'saml', extern_uid: uid }
                                                           ])
               end
@@ -180,7 +180,7 @@ describe Gitlab::Saml::User, lib: true do
                 expect(gl_user.email).to eql 'john@mail.com'
                 expect(gl_user.identities.length).to eql 2
                 identities_as_hash = gl_user.identities.map { |id| { provider: id.provider, extern_uid: id.extern_uid } }
-                expect(identities_as_hash).to match_array([ { provider: 'ldapmain', extern_uid: 'uid=user1,ou=People,dc=example' },
+                expect(identities_as_hash).to match_array([{ provider: 'ldapmain', extern_uid: 'uid=user1,ou=People,dc=example' },
                                                             { provider: 'saml', extern_uid: uid }
                                                           ])
               end
@@ -206,7 +206,7 @@ describe Gitlab::Saml::User, lib: true do
                 expect(local_gl_user).to be_valid
                 expect(local_gl_user.identities.length).to eql 2
                 identities_as_hash = local_gl_user.identities.map { |id| { provider: id.provider, extern_uid: id.extern_uid } }
-                expect(identities_as_hash).to match_array([ { provider: 'ldapmain', extern_uid: 'uid=user1,ou=People,dc=example' },
+                expect(identities_as_hash).to match_array([{ provider: 'ldapmain', extern_uid: 'uid=user1,ou=People,dc=example' },
                                                             { provider: 'saml', extern_uid: 'uid=user1,ou=People,dc=example' }
                                                           ])
               end
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 2725c63f13b6cbe7aee350707cd4619b041853e4..2611a0be92fc71d3952c06ec1bb23b42e93bd7f5 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -1262,8 +1262,8 @@ describe Ci::Build, :models do
 
     context 'when build has user' do
       let(:user_variables) do
-        [ { key: 'GITLAB_USER_ID',    value: user.id.to_s, public: true },
-          { key: 'GITLAB_USER_EMAIL', value: user.email,   public: true } ]
+        [{ key: 'GITLAB_USER_ID',    value: user.id.to_s, public: true },
+          { key: 'GITLAB_USER_EMAIL', value: user.email,   public: true }]
       end
 
       before do
diff --git a/spec/models/cycle_analytics/staging_spec.rb b/spec/models/cycle_analytics/staging_spec.rb
index 9a024d533a16066e7300cf7ddcccb0f66209ec25..78ec518ac860434176da43bb4419252c48f20674 100644
--- a/spec/models/cycle_analytics/staging_spec.rb
+++ b/spec/models/cycle_analytics/staging_spec.rb
@@ -18,7 +18,7 @@ describe 'CycleAnalytics#staging', feature: true do
     start_time_conditions: [["merge request that closes issue is merged",
                              -> (context, data) do
                                context.merge_merge_requests_closing_issue(data[:issue])
-                             end ]],
+                             end]],
     end_time_conditions:   [["merge request that closes issue is deployed to production",
                              -> (context, data) do
                                context.deploy_master
diff --git a/spec/models/members/project_member_spec.rb b/spec/models/members/project_member_spec.rb
index e4be0aba7a6a3711947cd41a4b94708e4f415acb..87ea2e706807d39431b2d90ecc8c4129feb43bcf 100644
--- a/spec/models/members/project_member_spec.rb
+++ b/spec/models/members/project_member_spec.rb
@@ -89,8 +89,8 @@ describe ProjectMember, models: true do
       @user_1 = create :user
       @user_2 = create :user
 
-      @project_1.team << [ @user_1, :developer ]
-      @project_2.team << [ @user_2, :reporter ]
+      @project_1.team << [@user_1, :developer]
+      @project_2.team << [@user_2, :reporter]
 
       @status = @project_2.team.import(@project_1)
     end
@@ -137,8 +137,8 @@ describe ProjectMember, models: true do
       @user_1 = create :user
       @user_2 = create :user
 
-      @project_1.team << [ @user_1, :developer]
-      @project_2.team << [ @user_2, :reporter]
+      @project_1.team << [@user_1, :developer]
+      @project_2.team << [@user_2, :reporter]
 
       ProjectMember.truncate_teams([@project_1.id, @project_2.id])
     end
diff --git a/spec/models/project_services/kubernetes_service_spec.rb b/spec/models/project_services/kubernetes_service_spec.rb
index 9052479d35eb48916b71783b9dccd20445d05069..24356447fed7e35054a44699a320a5dd32c3f59b 100644
--- a/spec/models/project_services/kubernetes_service_spec.rb
+++ b/spec/models/project_services/kubernetes_service_spec.rb
@@ -171,7 +171,7 @@ describe KubernetesService, models: true, caching: true do
 
     context 'with invalid pods' do
       it 'returns no terminals' do
-        stub_reactive_cache(service, pods: [ { "bad" => "pod" } ])
+        stub_reactive_cache(service, pods: [{ "bad" => "pod" }])
 
         is_expected.to be_empty
       end
@@ -184,7 +184,7 @@ describe KubernetesService, models: true, caching: true do
       before do
         stub_reactive_cache(
           service,
-          pods: [ pod, pod, kube_pod(app: "should-be-filtered-out") ]
+          pods: [pod, pod, kube_pod(app: "should-be-filtered-out")]
         )
       end
 
diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb
index ff2e0d58d2a821f20b1b9e1656d8f94f2e4814b9..b82372b1b601b2687de8ad924a407312b91fd146 100644
--- a/spec/requests/api/groups_spec.rb
+++ b/spec/requests/api/groups_spec.rb
@@ -303,7 +303,7 @@ describe API::Groups, api: true  do
         expect(response).to have_http_status(200)
         expect(response).to include_pagination_headers
         expect(json_response.length).to eq(2)
-        project_names = json_response.map { |proj| proj['name' ] }
+        project_names = json_response.map { |proj| proj['name'] }
         expect(project_names).to match_array([project1.name, project3.name])
         expect(json_response.first['visibility_level']).to be_present
       end
@@ -314,7 +314,7 @@ describe API::Groups, api: true  do
         expect(response).to have_http_status(200)
         expect(response).to include_pagination_headers
         expect(json_response.length).to eq(2)
-        project_names = json_response.map { |proj| proj['name' ] }
+        project_names = json_response.map { |proj| proj['name'] }
         expect(project_names).to match_array([project1.name, project3.name])
         expect(json_response.first['visibility_level']).not_to be_present
       end
@@ -398,7 +398,7 @@ describe API::Groups, api: true  do
 
         expect(response).to have_http_status(200)
         expect(response).to include_pagination_headers
-        project_names = json_response.map { |proj| proj['name' ] }
+        project_names = json_response.map { |proj| proj['name'] }
         expect(project_names).to match_array([project1.name, project3.name])
       end
 
diff --git a/spec/services/protected_branches/create_service_spec.rb b/spec/services/protected_branches/create_service_spec.rb
index 7d4eff3b6ef6c14c3f9c5cef4c749cdfa4df3d7c..6ea8f3099813dff87339cc92d1e9da8b9b8ae28a 100644
--- a/spec/services/protected_branches/create_service_spec.rb
+++ b/spec/services/protected_branches/create_service_spec.rb
@@ -6,8 +6,8 @@ describe ProtectedBranches::CreateService, services: true do
   let(:params) do
     {
       name: 'master',
-      merge_access_levels_attributes: [ { access_level: Gitlab::Access::MASTER } ],
-      push_access_levels_attributes: [ { access_level: Gitlab::Access::MASTER } ]
+      merge_access_levels_attributes: [{ access_level: Gitlab::Access::MASTER }],
+      push_access_levels_attributes: [{ access_level: Gitlab::Access::MASTER }]
     }
   end
 
diff --git a/spec/support/kubernetes_helpers.rb b/spec/support/kubernetes_helpers.rb
index 444612cf8713091a75762c2a0e83fbb980478aa3..41c40eb508402e1741994babd5b1a295f88a4cfb 100644
--- a/spec/support/kubernetes_helpers.rb
+++ b/spec/support/kubernetes_helpers.rb
@@ -11,7 +11,7 @@ module KubernetesHelpers
 
   def kube_pods_body(*pods)
     { "kind" => "PodList",
-      "items" => [ kube_pod ],
+      "items" => [kube_pod],
     }
   end
 
diff --git a/spec/support/services/issuable_create_service_slash_commands_shared_examples.rb b/spec/support/services/issuable_create_service_slash_commands_shared_examples.rb
index c64574679b6debd94f0ccab013bf5ae8b191a409..81d06dc2a3dd27372af27d7cf930c6278f17e63a 100644
--- a/spec/support/services/issuable_create_service_slash_commands_shared_examples.rb
+++ b/spec/support/services/issuable_create_service_slash_commands_shared_examples.rb
@@ -11,7 +11,7 @@ shared_examples 'new issuable record that supports slash commands' do
   let(:params) { base_params.merge(defined?(default_params) ? default_params : {}).merge(example_params) }
   let(:issuable) { described_class.new(project, user, params).execute }
 
-  before { project.team << [assignee, :master ] }
+  before { project.team << [assignee, :master] }
 
   context 'with labels in command only' do
     let(:example_params) do