Skip to content

Commit

Permalink
deprecation warning fix: inerherit from RuboCop::Cop::Base instead of…
Browse files Browse the repository at this point in the history
… RuboCop::Cop::Cop
  • Loading branch information
nicowenterodt committed Nov 11, 2024
1 parent 98d4bbe commit 924f830
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/fixture/extend_config/bananas.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module RuboCop
module Cop
module Bananas
class BananasOnly < Cop
class BananasOnly < Base
def on_lvasgn(node)
name, = *node

Expand Down
2 changes: 1 addition & 1 deletion test/fixture/extend_config/betterment.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module RuboCop
module Cop
module Betterment
class UnscopedFind < Cop
class UnscopedFind < Base
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/fixture/plugins/project/lib/banana/banana_bomb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/fixture/plugins/project/lib/banana/bananas.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 924f830

Please sign in to comment.