Class: Henitai::AridNodeFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/henitai/arid_node_filter.rb

Overview

Suppresses AST nodes that are unlikely to produce useful mutants.

Constant Summary collapse

DIRECT_OUTPUT_METHODS =
%i[puts p pp warn].freeze
DIRECT_DEBUG_METHODS =
%i[byebug debugger].freeze
BINDING_DEBUG_METHODS =
%i[pry].freeze
LOGGER_METHODS =
%i[debug info warn error fatal].freeze
INVARIANT_METHODS =
%i[is_a? respond_to? kind_of?].freeze
DSL_METHODS =
%i[let subject before after].freeze

Instance Method Summary collapse

Instance Method Details

#suppressed?(node, config) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/henitai/arid_node_filter.rb', line 13

def suppressed?(node, config)
  custom_pattern_match?(node, config) || catalog_match?(node)
end