Skip to content

Commit

Permalink
Remove RuboCop::RSpec::Language::NodePattern
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Mar 12, 2024
1 parent 447fa4e commit 6c6fd8b
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 58 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Master (Unreleased)

- Remove `RuboCop::RSpec::Language::NodePattern`. ([@ydah])

## 2.27.1 (2024-03-03)

- Fix a false positive for `RSpec/RepeatedSubjectCall` when `subject.method_call`. ([@ydah])
Expand Down
5 changes: 1 addition & 4 deletions lib/rubocop-rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@

require_relative 'rubocop/rspec'
require_relative 'rubocop/rspec/inject'
require_relative 'rubocop/rspec/language/node_pattern'
require_relative 'rubocop/rspec/language'
require_relative 'rubocop/rspec/node'
require_relative 'rubocop/rspec/version'
require_relative 'rubocop/rspec/wording'

# Dependent on `RuboCop::RSpec::Language::NodePattern`.
require_relative 'rubocop/rspec/language'

require_relative 'rubocop/cop/rspec/mixin/file_help'
require_relative 'rubocop/cop/rspec/mixin/final_end_location'
require_relative 'rubocop/cop/rspec/mixin/inside_example_group'
Expand Down
1 change: 0 additions & 1 deletion lib/rubocop/cop/rspec/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module RSpec
# @abstract parent class to RSpec cops
class Base < ::RuboCop::Cop::Base
include RuboCop::RSpec::Language
extend RuboCop::RSpec::Language::NodePattern

exclude_from_registry

Expand Down
2 changes: 0 additions & 2 deletions lib/rubocop/cop/rspec/expect_actual.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ def on_send(node)

private

# This is not implemented using a NodePattern because it seems
# to not be able to match against an explicit (nil) sexp
def literal?(node)
node && (simple_literal?(node) || complex_literal?(node))
end
Expand Down
1 change: 0 additions & 1 deletion lib/rubocop/cop/rspec/remove_const.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module RSpec
#
class RemoveConst < Base
include RuboCop::RSpec::Language
extend RuboCop::RSpec::Language::NodePattern

MSG = 'Do not use remove_const in specs. ' \
'Consider using e.g. `stub_const`.'
Expand Down
1 change: 0 additions & 1 deletion lib/rubocop/rspec/concept.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module RSpec
# Wrapper for RSpec DSL methods
class Concept
extend RuboCop::NodePattern::Macros
extend Language::NodePattern
include Language

def initialize(node)
Expand Down
1 change: 0 additions & 1 deletion lib/rubocop/rspec/language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module RSpec
# using the configured aliases.
module Language
extend RuboCop::NodePattern::Macros
extend NodePattern

class << self
attr_accessor :config
Expand Down
48 changes: 0 additions & 48 deletions lib/rubocop/rspec/language/node_pattern.rb

This file was deleted.

0 comments on commit 6c6fd8b

Please sign in to comment.