diff --git a/.rubocop.yml b/.rubocop.yml index b43ff6dd88f..99f84d8ef02 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -183,15 +183,6 @@ Lint/UnderscorePrefixedVariableName: Lint/UnifiedInteger: Enabled: true -Lint/UnneededCopDisableDirective: - Enabled: true - -Lint/UnneededCopEnableDirective: - Enabled: true - -Lint/UnneededSplatExpansion: - Enabled: true - Lint/UnreachableCode: Enabled: true @@ -705,9 +696,18 @@ Style/RedundantBegin: Style/RedundantConditional: Enabled: true +Lint/RedundantCopDisableDirective: + Enabled: true + +Lint/RedundantCopEnableDirective: + Enabled: true + Style/RedundantException: Enabled: true +Style/RedundantInterpolation: + Enabled: true + Style/RedundantParentheses: Enabled: true @@ -717,6 +717,9 @@ Style/RedundantSelf: Style/RedundantSortBy: Enabled: true +Lint/RedundantSplatExpansion: + Enabled: true + Style/RegexpLiteral: Enabled: true @@ -798,9 +801,6 @@ Style/TrailingCommaInHashLiteral: Style/TrailingMethodEndStatement: Enabled: true -Style/UnneededInterpolation: - Enabled: true - Style/UnlessElse: Enabled: true diff --git a/spec/bundler/fetcher_spec.rb b/spec/bundler/fetcher_spec.rb index 184b9efa646..9176eb32f0d 100644 --- a/spec/bundler/fetcher_spec.rb +++ b/spec/bundler/fetcher_spec.rb @@ -144,14 +144,14 @@ describe "include CI information" do it "from one CI" do with_env_vars("JENKINS_URL" => "foo") do - ci_part = fetcher.user_agent.split(" ").find {|x| x.match(%r{\Aci/}) } + ci_part = fetcher.user_agent.split(" ").find {|x| x.start_with?("ci/") } expect(ci_part).to match("jenkins") end end it "from many CI" do with_env_vars("TRAVIS" => "foo", "CI_NAME" => "my_ci") do - ci_part = fetcher.user_agent.split(" ").find {|x| x.match(%r{\Aci/}) } + ci_part = fetcher.user_agent.split(" ").find {|x| x.start_with?("ci/") } expect(ci_part).to match("travis") expect(ci_part).to match("my_ci") end diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb index 74ac7f50c56..5bfcac5ac40 100644 --- a/spec/support/rubygems_ext.rb +++ b/spec/support/rubygems_ext.rb @@ -10,8 +10,8 @@ module Rubygems "rake" => "~> 12.0", "ronn" => "~> 0.7.3", "rspec" => "~> 3.8", - "rubocop" => "= 0.74.0", - "rubocop-performance" => "= 1.4.0", + "rubocop" => "= 0.76.0", + "rubocop-performance" => "= 1.5.1", }.freeze DEPS = {