Commit d40298c8 authored by Stan Hu's avatar Stan Hu

Upgrade to Rubocop 0.68.1

This adds Ruby 2.6 support.
parent 0ca24531
This diff is collapsed.
...@@ -349,9 +349,10 @@ group :development, :test do ...@@ -349,9 +349,10 @@ group :development, :test do
gem 'spring', '~> 2.0.0' gem 'spring', '~> 2.0.0'
gem 'spring-commands-rspec', '~> 1.0.4' gem 'spring-commands-rspec', '~> 1.0.4'
gem 'gitlab-styles', '~> 2.5', require: false gem 'gitlab-styles', '~> 2.6', require: false
# Pin these dependencies, otherwise a new rule could break the CI pipelines # Pin these dependencies, otherwise a new rule could break the CI pipelines
gem 'rubocop', '~> 0.54.0' gem 'rubocop', '~> 0.68.1'
gem 'rubocop-performance', '~> 1.1.0'
gem 'rubocop-rspec', '~> 1.22.1' gem 'rubocop-rspec', '~> 1.22.1'
gem 'scss_lint', '~> 0.56.0', require: false gem 'scss_lint', '~> 0.56.0', require: false
......
...@@ -297,9 +297,10 @@ GEM ...@@ -297,9 +297,10 @@ GEM
gitlab-markup (1.7.0) gitlab-markup (1.7.0)
gitlab-sidekiq-fetcher (0.4.0) gitlab-sidekiq-fetcher (0.4.0)
sidekiq (~> 5) sidekiq (~> 5)
gitlab-styles (2.5.2) gitlab-styles (2.6.1)
rubocop (~> 0.54.0) rubocop (~> 0.68.1)
rubocop-gitlab-security (~> 0.1.0) rubocop-gitlab-security (~> 0.1.0)
rubocop-performance (~> 1.1.0)
rubocop-rspec (~> 1.19) rubocop-rspec (~> 1.19)
gitlab_omniauth-ldap (2.1.1) gitlab_omniauth-ldap (2.1.1)
net-ldap (~> 0.16) net-ldap (~> 0.16)
...@@ -407,6 +408,7 @@ GEM ...@@ -407,6 +408,7 @@ GEM
jaeger-client (0.10.0) jaeger-client (0.10.0)
opentracing (~> 0.3) opentracing (~> 0.3)
thrift thrift
jaro_winkler (1.5.2)
jira-ruby (1.4.1) jira-ruby (1.4.1)
activesupport activesupport
multipart-post multipart-post
...@@ -585,7 +587,7 @@ GEM ...@@ -585,7 +587,7 @@ GEM
rubypants (~> 0.2) rubypants (~> 0.2)
orm_adapter (0.5.0) orm_adapter (0.5.0)
os (1.0.0) os (1.0.0)
parallel (1.12.1) parallel (1.17.0)
parser (2.5.3.0) parser (2.5.3.0)
ast (~> 2.4.0) ast (~> 2.4.0)
parslet (1.8.2) parslet (1.8.2)
...@@ -615,7 +617,6 @@ GEM ...@@ -615,7 +617,6 @@ GEM
pg (1.1.4) pg (1.1.4)
po_to_json (1.0.1) po_to_json (1.0.1)
json (>= 1.6.0) json (>= 1.6.0)
powerpack (0.1.1)
premailer (1.10.4) premailer (1.10.4)
addressable addressable
css_parser (>= 1.4.10) css_parser (>= 1.4.10)
...@@ -787,15 +788,17 @@ GEM ...@@ -787,15 +788,17 @@ GEM
pg pg
rails rails
sqlite3 sqlite3
rubocop (0.54.0) rubocop (0.68.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 2.5) parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1) unicode-display_width (>= 1.4.0, < 1.6)
rubocop-gitlab-security (0.1.1) rubocop-gitlab-security (0.1.1)
rubocop (>= 0.51) rubocop (>= 0.51)
rubocop-performance (1.1.0)
rubocop (>= 0.67.0)
rubocop-rspec (1.22.2) rubocop-rspec (1.22.2)
rubocop (>= 0.52.1) rubocop (>= 0.52.1)
ruby-enum (0.7.2) ruby-enum (0.7.2)
...@@ -803,7 +806,7 @@ GEM ...@@ -803,7 +806,7 @@ GEM
ruby-fogbugz (0.2.1) ruby-fogbugz (0.2.1)
crack (~> 0.4) crack (~> 0.4)
ruby-prof (0.17.0) ruby-prof (0.17.0)
ruby-progressbar (1.9.0) ruby-progressbar (1.10.0)
ruby-saml (1.7.2) ruby-saml (1.7.2)
nokogiri (>= 1.5.10) nokogiri (>= 1.5.10)
ruby_parser (3.11.0) ruby_parser (3.11.0)
...@@ -929,7 +932,7 @@ GEM ...@@ -929,7 +932,7 @@ GEM
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.7.5) unf_ext (0.0.7.5)
unicode-display_width (1.3.2) unicode-display_width (1.5.0)
unicorn (5.4.1) unicorn (5.4.1)
kgio (~> 2.6) kgio (~> 2.6)
raindrops (~> 0.7) raindrops (~> 0.7)
...@@ -1065,7 +1068,7 @@ DEPENDENCIES ...@@ -1065,7 +1068,7 @@ DEPENDENCIES
gitlab-labkit (~> 0.2.0) gitlab-labkit (~> 0.2.0)
gitlab-markup (~> 1.7.0) gitlab-markup (~> 1.7.0)
gitlab-sidekiq-fetcher (~> 0.4.0) gitlab-sidekiq-fetcher (~> 0.4.0)
gitlab-styles (~> 2.5) gitlab-styles (~> 2.6)
gitlab_omniauth-ldap (~> 2.1.1) gitlab_omniauth-ldap (~> 2.1.1)
gon (~> 6.2) gon (~> 6.2)
google-api-client (~> 0.23) google-api-client (~> 0.23)
...@@ -1171,7 +1174,8 @@ DEPENDENCIES ...@@ -1171,7 +1174,8 @@ DEPENDENCIES
rspec-set (~> 0.1.3) rspec-set (~> 0.1.3)
rspec_junit_formatter rspec_junit_formatter
rspec_profiling (~> 0.0.5) rspec_profiling (~> 0.0.5)
rubocop (~> 0.54.0) rubocop (~> 0.68.1)
rubocop-performance (~> 1.1.0)
rubocop-rspec (~> 1.22.1) rubocop-rspec (~> 1.22.1)
ruby-fogbugz (~> 0.2.1) ruby-fogbugz (~> 0.2.1)
ruby-prof (~> 0.17.0) ruby-prof (~> 0.17.0)
......
...@@ -2,7 +2,7 @@ module RuboCop ...@@ -2,7 +2,7 @@ module RuboCop
module Cop module Cop
module Gitlab module Gitlab
class FinderWithFindBy < RuboCop::Cop::Cop class FinderWithFindBy < RuboCop::Cop::Cop
FIND_PATTERN = /\Afind(_by\!?)?\z/ FIND_PATTERN = /\Afind(_by\!?)?\z/.freeze
ALLOWED_MODULES = ['FinderMethods'].freeze ALLOWED_MODULES = ['FinderMethods'].freeze
def message(used_method) def message(used_method)
...@@ -36,7 +36,7 @@ module RuboCop ...@@ -36,7 +36,7 @@ module RuboCop
def find_on_execute?(node) def find_on_execute?(node)
chained_on_node = node.descendants.first chained_on_node = node.descendants.first
node.method_name.to_s =~ FIND_PATTERN && node.method_name.to_s =~ FIND_PATTERN &&
chained_on_node&.method_name == :execute chained_on_node.is_a?(RuboCop::AST::SendNode) && chained_on_node.method_name == :execute
end end
def allowed_module?(node) def allowed_module?(node)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment