Sha256: 40048c40eed40e986c192a058fc09a1e6f1560d3df558c80f122f4cd125672d6

Contents?: true

Size: 402 Bytes

Versions: 6

Compression:

Stored size: 402 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module RSpec
    # Helps check offenses with variable definitions
    module Variable
      include Language
      extend RuboCop::NodePattern::Macros

      def_node_matcher :variable_definition?, <<~PATTERN
        (send nil? #{(Helpers::ALL + Subject::ALL).node_pattern_union}
          $({sym str dsym dstr} ...) ...)
      PATTERN
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubocop-rspec-2.0.0.pre lib/rubocop/rspec/variable.rb
rubocop-rspec-1.44.1 lib/rubocop/rspec/variable.rb
rubocop-rspec-1.44.0 lib/rubocop/rspec/variable.rb
rubocop-rspec-1.43.2 lib/rubocop/rspec/variable.rb
rubocop-rspec-1.43.1 lib/rubocop/rspec/variable.rb
rubocop-rspec-1.43.0 lib/rubocop/rspec/variable.rb