diff --git a/.rubocop.yml b/.rubocop.yml index 556a5d11a394a7152bced1f73bb63a8ba565f205..d90c47022ecd3f3345e389ec16e4849f169d8ab6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -149,7 +149,7 @@ Style/EmptyLinesAroundAccessModifier: # Keeps track of empty lines around block bodies. Style/EmptyLinesAroundBlockBody: - Enabled: false + Enabled: true # Keeps track of empty lines around class bodies. Style/EmptyLinesAroundClassBody: @@ -161,7 +161,7 @@ Style/EmptyLinesAroundModuleBody: # Keeps track of empty lines around method bodies. Style/EmptyLinesAroundMethodBody: - Enabled: false + Enabled: true # Avoid the use of END blocks. Style/EndBlock: diff --git a/spec/features/admin/admin_disables_git_access_protocol_spec.rb b/spec/features/admin/admin_disables_git_access_protocol_spec.rb index 5b1c0460274087b2b7f3fab5ba8849d356c4e39e..66044b444952de468dd1448ae61bbd47d8fcca89 100644 --- a/spec/features/admin/admin_disables_git_access_protocol_spec.rb +++ b/spec/features/admin/admin_disables_git_access_protocol_spec.rb @@ -45,7 +45,6 @@ feature 'Admin disables Git access protocol', feature: true do expect(page).to have_content("git clone #{project.ssh_url_to_repo}") expect(page).to have_selector('#clone-dropdown') end - end def visit_project diff --git a/spec/lib/banzai/filter/video_link_filter_spec.rb b/spec/lib/banzai/filter/video_link_filter_spec.rb index cc4349f80ba5aa18f2f60c44b53afd3b37062d1b..6ab1be9ccb70e879d0c23369cf1c2bd7812411e1 100644 --- a/spec/lib/banzai/filter/video_link_filter_spec.rb +++ b/spec/lib/banzai/filter/video_link_filter_spec.rb @@ -47,5 +47,4 @@ describe Banzai::Filter::VideoLinkFilter, lib: true do expect(element['src']).to eq '/path/my_image.jpg' end 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 61490555ff5a4039954e684d1148e5ccf90a825f..a7d1d6b0a8bfda954223c29ee575bf014d1f4cc8 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -534,7 +534,6 @@ module Ci end context 'when also global variables are defined' do - end context 'when syntax is correct' do diff --git a/spec/lib/gitlab/git/hook_spec.rb b/spec/lib/gitlab/git/hook_spec.rb index a15aa173fbd314baf0435024a1ef9e6cfabcc12e..d1f947b68500940e51248da3b45039c40720c329 100644 --- a/spec/lib/gitlab/git/hook_spec.rb +++ b/spec/lib/gitlab/git/hook_spec.rb @@ -25,7 +25,6 @@ describe Gitlab::Git::Hook, lib: true do end ['pre-receive', 'post-receive', 'update'].each do |hook_name| - context "when triggering a #{hook_name} hook" do context "when the hook is successful" do it "returns success with no errors" do diff --git a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb index 32c0d6462f14917758dbb71bfb356de5ccac0756..5fdd4d5f25f15e621a2c60ec68178454c233bdc2 100644 --- a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' describe Gitlab::ImportExport::ProjectTreeRestorer, services: true do describe 'restore project tree' do - let(:user) { create(:user) } let(:namespace) { create(:namespace, owner: user) } let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: "", project_path: 'path') } diff --git a/spec/lib/gitlab/user_access_spec.rb b/spec/lib/gitlab/user_access_spec.rb index 5bb095366fa1d7cc2650d4f3b90ad1e498a6e2ff..b67e5efb244dd80e3995c0fa5f8f2af9276ed8c0 100644 --- a/spec/lib/gitlab/user_access_spec.rb +++ b/spec/lib/gitlab/user_access_spec.rb @@ -83,6 +83,5 @@ describe Gitlab::UserAccess, lib: true do expect(access.can_merge_to_branch?(@branch.name)).to be_falsey end end - end end