diff options
author | Robert Speicher <robert@gitlab.com> | 2016-08-08 23:31:00 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-08-08 23:31:00 +0000 |
commit | 900c67bfb91aa984042e556516a7369b40766be7 (patch) | |
tree | b4fdb05075293b32bf6445f9e796e4deb1d96bac | |
parent | fa95d9e48bcbe6c0958d8faf2906ec1c3482440b (diff) | |
parent | 65871dfda5fe864c58e6b373408bca372b3c6c06 (diff) | |
download | gitlab-ce-900c67bfb91aa984042e556516a7369b40766be7.tar.gz |
Merge branch 'rubocop/enable-more-cops-for-empty-lines' into 'master'
Enable some Rubocop cops related to new lines
## What does this MR do?
This MR enabled two additional Rubocop cops:
Keeps track of empty lines around block bodies.
`Style/EmptyLinesAroundBlockBody`
Keeps track of empty lines around method bodies.
` Style/EmptyLinesAroundMethodBody`
See merge request !5637
-rw-r--r-- | .rubocop.yml | 4 | ||||
-rw-r--r-- | spec/features/admin/admin_disables_git_access_protocol_spec.rb | 1 | ||||
-rw-r--r-- | spec/lib/banzai/filter/video_link_filter_spec.rb | 1 | ||||
-rw-r--r-- | spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/git/hook_spec.rb | 1 | ||||
-rw-r--r-- | spec/lib/gitlab/import_export/project_tree_restorer_spec.rb | 1 |
6 files changed, 2 insertions, 10 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 4727daa0545..282f4539f03 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 5b1c0460274..66044b44495 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 cc4349f80ba..6ab1be9ccb7 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 61490555ff5..85374b8761d 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -533,10 +533,6 @@ module Ci } end - context 'when also global variables are defined' do - - end - context 'when syntax is correct' do let(:variables) do { VAR1: 'value1', VAR2: 'value2' } diff --git a/spec/lib/gitlab/git/hook_spec.rb b/spec/lib/gitlab/git/hook_spec.rb index a15aa173fbd..d1f947b6850 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 32c0d6462f1..5fdd4d5f25f 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') } |