summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.rubocop_todo.yml6
-rw-r--r--Gemfile4
-rw-r--r--Gemfile.lock22
-rw-r--r--Gemfile.rails5.lock22
-rw-r--r--rubocop/cop/line_break_around_conditional_block.rb2
5 files changed, 32 insertions, 24 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 3e1713f845e..8a1ca6747a8 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -199,12 +199,6 @@ Naming/HeredocDelimiterCase:
Naming/HeredocDelimiterNaming:
Enabled: false
-# Offense count: 27
-# Cop supports --auto-correct.
-# Configuration parameters: AutoCorrect.
-Performance/HashEachMethods:
- Enabled: false
-
# Offense count: 1
Performance/UnfreezeString:
Exclude:
diff --git a/Gemfile b/Gemfile
index 1fbc240bf6f..e52627dbadd 100644
--- a/Gemfile
+++ b/Gemfile
@@ -351,9 +351,9 @@ group :development, :test do
gem 'spring', '~> 2.0.0'
gem 'spring-commands-rspec', '~> 1.0.4'
- gem 'gitlab-styles', '~> 2.3', require: false
+ gem 'gitlab-styles', '~> 2.4', require: false, git: 'https://gitlab.com/gitlab-org/gitlab-styles.git', branch: 'update-to-0.54.0'
# Pin these dependencies, otherwise a new rule could break the CI pipelines
- gem 'rubocop', '~> 0.52.1'
+ gem 'rubocop', '~> 0.54.0'
gem 'rubocop-rspec', '~> 1.22.1'
gem 'scss_lint', '~> 0.56.0', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index a889c4dc3a0..41d22f3ec89 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,3 +1,13 @@
+GIT
+ remote: https://gitlab.com/gitlab-org/gitlab-styles.git
+ revision: f3250343d3a13a154fe9b2d356440654297b0624
+ branch: update-to-0.54.0
+ specs:
+ gitlab-styles (2.4.0)
+ rubocop (~> 0.54.0)
+ rubocop-gitlab-security (~> 0.1.0)
+ rubocop-rspec (~> 1.19)
+
GEM
remote: https://rubygems.org/
specs:
@@ -312,10 +322,6 @@ GEM
mime-types (>= 1.16)
posix-spawn (~> 0.3)
gitlab-markup (1.6.4)
- gitlab-styles (2.3.2)
- rubocop (~> 0.51)
- rubocop-gitlab-security (~> 0.1.0)
- rubocop-rspec (~> 1.19)
gitlab_omniauth-ldap (2.0.4)
net-ldap (~> 0.16)
omniauth (~> 1.3)
@@ -776,9 +782,9 @@ GEM
pg
rails
sqlite3
- rubocop (0.52.1)
+ rubocop (0.54.0)
parallel (~> 1.10)
- parser (>= 2.4.0.2, < 3.0)
+ parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
@@ -1043,7 +1049,7 @@ DEPENDENCIES
gitlab-gollum-lib (~> 4.2)
gitlab-gollum-rugged_adapter (~> 0.4.4)
gitlab-markup (~> 1.6.4)
- gitlab-styles (~> 2.3)
+ gitlab-styles (~> 2.4)!
gitlab_omniauth-ldap (~> 2.0.4)
gon (~> 6.2)
google-api-client (~> 0.19.8)
@@ -1143,7 +1149,7 @@ DEPENDENCIES
rspec-retry (~> 0.4.5)
rspec-set (~> 0.1.3)
rspec_profiling (~> 0.0.5)
- rubocop (~> 0.52.1)
+ rubocop (~> 0.54.0)
rubocop-rspec (~> 1.22.1)
ruby-fogbugz (~> 0.2.1)
ruby-prof (~> 0.17.0)
diff --git a/Gemfile.rails5.lock b/Gemfile.rails5.lock
index 8c46b8c5916..b74cbf41343 100644
--- a/Gemfile.rails5.lock
+++ b/Gemfile.rails5.lock
@@ -1,3 +1,13 @@
+GIT
+ remote: https://gitlab.com/gitlab-org/gitlab-styles.git
+ revision: f3250343d3a13a154fe9b2d356440654297b0624
+ branch: update-to-0.54.0
+ specs:
+ gitlab-styles (2.4.0)
+ rubocop (~> 0.54.0)
+ rubocop-gitlab-security (~> 0.1.0)
+ rubocop-rspec (~> 1.19)
+
GEM
remote: https://rubygems.org/
specs:
@@ -315,10 +325,6 @@ GEM
mime-types (>= 1.16)
posix-spawn (~> 0.3)
gitlab-markup (1.6.4)
- gitlab-styles (2.3.2)
- rubocop (~> 0.51)
- rubocop-gitlab-security (~> 0.1.0)
- rubocop-rspec (~> 1.19)
gitlab_omniauth-ldap (2.0.4)
net-ldap (~> 0.16)
omniauth (~> 1.3)
@@ -785,9 +791,9 @@ GEM
pg
rails
sqlite3
- rubocop (0.52.1)
+ rubocop (0.54.0)
parallel (~> 1.10)
- parser (>= 2.4.0.2, < 3.0)
+ parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
@@ -1053,7 +1059,7 @@ DEPENDENCIES
gitlab-gollum-lib (~> 4.2)
gitlab-gollum-rugged_adapter (~> 0.4.4)
gitlab-markup (~> 1.6.4)
- gitlab-styles (~> 2.3)
+ gitlab-styles (~> 2.4)!
gitlab_omniauth-ldap (~> 2.0.4)
gon (~> 6.2)
google-api-client (~> 0.19.8)
@@ -1154,7 +1160,7 @@ DEPENDENCIES
rspec-retry (~> 0.4.5)
rspec-set (~> 0.1.3)
rspec_profiling (~> 0.0.5)
- rubocop (~> 0.52.1)
+ rubocop (~> 0.54.0)
rubocop-rspec (~> 1.22.1)
ruby-fogbugz (~> 0.2.1)
ruby-prof (~> 0.17.0)
diff --git a/rubocop/cop/line_break_around_conditional_block.rb b/rubocop/cop/line_break_around_conditional_block.rb
index 8b6052fee1b..011f2bcf8bf 100644
--- a/rubocop/cop/line_break_around_conditional_block.rb
+++ b/rubocop/cop/line_break_around_conditional_block.rb
@@ -43,6 +43,8 @@ module RuboCop
# end
# end
class LineBreakAroundConditionalBlock < RuboCop::Cop::Cop
+ include RangeHelp
+
MSG = 'Add a line break around conditional blocks'
def on_if(node)