Sha256: 203b743045ad79d6ab3af44b6123c26f7392fadbc098d6f8cb8f9aa40d71f756
Contents?: true
Size: 867 Bytes
Versions: 1
Compression:
Stored size: 867 Bytes
Contents
require 'reek/core/code_parser' require 'reek/core/smell_repository' require 'reek/source/config_file' module Reek module Core # # Configures all available smell detectors and applies them to a source. # class Sniffer def initialize(src, extra_config_files = [], smell_repository = Core::SmellRepository.new(src.desc)) @smell_repository = smell_repository @source = src config_files = extra_config_files + @source.relevant_config_files config_files.each { |cf| Reek::Source::ConfigFile.new(cf).configure(@smell_repository) } end def report_on(listener) CodeParser.new(@smell_repository).process(@source.syntax_tree) @smell_repository.report_on(listener) end def examine(scope, node_type) @smell_repository.examine scope, node_type end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reek-1.4.0 | lib/reek/core/sniffer.rb |