diff --git a/CHANGELOG.md b/CHANGELOG.md index 5733b0b2..cd9d029a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +* Updates rubocop to [1.68.0]https://github.com/rubocop/rubocop/tree/v1.68.0) +* Inherit from `RuboCop::Cop::Base` fixing deprecation warnings. +* Add new cops + ## 1.41.1 * Adds a stub method to the Ruby LSP add-on to avoid a potential runtime exception diff --git a/Gemfile.lock b/Gemfile.lock index 30fb9811..087a10ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,7 +4,7 @@ PATH standard (1.41.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.66.0) + rubocop (~> 1.68.0) standard-custom (~> 1.0.0) standard-performance (~> 1.5) @@ -34,7 +34,7 @@ GEM rbs (3.5.2) logger regexp_parser (2.8.2) - rubocop (1.66.1) + rubocop (1.68.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) diff --git a/config/base.yml b/config/base.yml index 3a66e759..5c58b249 100644 --- a/config/base.yml +++ b/config/base.yml @@ -512,6 +512,9 @@ Lint/DuplicateRequire: Lint/DuplicateRescueException: Enabled: true +Lint/DuplicateSetElement: + Enabled: false + Lint/EachWithObjectArgument: Enabled: true @@ -798,6 +801,9 @@ Lint/TripleQuotes: Lint/UnderscorePrefixedVariableName: Enabled: true +Lint/UnescapedBracketInRegexp: + Enabled: false + Lint/UnexpectedBlockArity: Enabled: false @@ -980,6 +986,9 @@ Style/Alias: Enabled: true EnforcedStyle: prefer_alias_method +Style/AmbiguousEndlessMethodDefinition: + Enabled: false + Style/AndOr: Enabled: true @@ -1017,6 +1026,9 @@ Style/BeginBlock: Style/BisectedAttrAccessor: Enabled: false +Style/BitwisePredicate: + Enabled: false + Style/BlockComments: Enabled: true @@ -1063,6 +1075,9 @@ Style/ColonMethodCall: Style/ColonMethodDefinition: Enabled: true +Style/CombinableDefined: + Enabled: false + Style/CombinableLoops: Enabled: false @@ -1290,6 +1305,9 @@ Style/InvertibleUnlessCondition: Style/IpAddresses: Enabled: false +Style/KeywordArgumentsMerging: + Enabled: false + Style/KeywordParametersOrder: Enabled: true @@ -1655,6 +1673,9 @@ Style/SafeNavigation: - try - try! +Style/SafeNavigationChainLength: + Emabled: false + Style/Sample: Enabled: true diff --git a/standard.gemspec b/standard.gemspec index f1fa51d9..c7fc5388 100644 --- a/standard.gemspec +++ b/standard.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.metadata["rubygems_mfa_required"] = "true" - spec.add_dependency "rubocop", "~> 1.66.0" + spec.add_dependency "rubocop", "~> 1.68.0" spec.add_dependency "lint_roller", "~> 1.0" spec.add_dependency "standard-custom", "~> 1.0.0" diff --git a/test/fixture/extend_config/bananas.rb b/test/fixture/extend_config/bananas.rb index d0066bc6..6fca5911 100644 --- a/test/fixture/extend_config/bananas.rb +++ b/test/fixture/extend_config/bananas.rb @@ -1,7 +1,7 @@ module RuboCop module Cop module Bananas - class BananasOnly < Cop + class BananasOnly < Base def on_lvasgn(node) name, = *node diff --git a/test/fixture/extend_config/betterment.rb b/test/fixture/extend_config/betterment.rb index 0ef05db4..1524b853 100644 --- a/test/fixture/extend_config/betterment.rb +++ b/test/fixture/extend_config/betterment.rb @@ -1,7 +1,7 @@ module RuboCop module Cop module Betterment - class UnscopedFind < Cop + class UnscopedFind < Base end end end diff --git a/test/fixture/plugins/project/lib/banana/banana_bomb.rb b/test/fixture/plugins/project/lib/banana/banana_bomb.rb index 7723710d..a58f998e 100644 --- a/test/fixture/plugins/project/lib/banana/banana_bomb.rb +++ b/test/fixture/plugins/project/lib/banana/banana_bomb.rb @@ -2,7 +2,7 @@ module RuboCop module Cop module Bananas - class BananaBomb < Cop + class BananaBomb < Base def on_class(node) add_offense(node, message: "🍌💣 - Better ignore me!") end diff --git a/test/fixture/plugins/project/lib/banana/bananas.rb b/test/fixture/plugins/project/lib/banana/bananas.rb index ac0ced92..b5053edf 100644 --- a/test/fixture/plugins/project/lib/banana/bananas.rb +++ b/test/fixture/plugins/project/lib/banana/bananas.rb @@ -1,7 +1,7 @@ module RuboCop module Cop module Bananas - class BananasOnly < Cop + class BananasOnly < Base def on_lvasgn(node) # cracks me up that we have to disable this cop inside itself name, = *node # standard:disable Bananas/BananasOnly diff --git a/test/standard/plugin/merges_plugins_into_rubocop_config_test.rb b/test/standard/plugin/merges_plugins_into_rubocop_config_test.rb index 064823d8..adf318ed 100644 --- a/test/standard/plugin/merges_plugins_into_rubocop_config_test.rb +++ b/test/standard/plugin/merges_plugins_into_rubocop_config_test.rb @@ -53,16 +53,16 @@ def rules(context) module RuboCop::Cop module Fake - class Things < RuboCop::Cop::Cop + class Things < RuboCop::Cop::Base end - class Stuff < RuboCop::Cop::Cop + class Stuff < RuboCop::Cop::Base end - class Junk < RuboCop::Cop::Cop + class Junk < RuboCop::Cop::Base end - class Crap < RuboCop::Cop::Cop + class Crap < RuboCop::Cop::Base end end end