Sha256: c018677fb575423c449571d53b7cb6a61a86dddb28f11b9fe3b67c6560a2875a

Contents?: true

Size: 940 Bytes

Versions: 6

Compression:

Stored size: 940 Bytes

Contents

require 'rubycritic/core/analysed_modules_collection'
require 'rubycritic/analysers/smells/flay'
require 'rubycritic/analysers/smells/flog'
require 'rubycritic/analysers/smells/reek'
require 'rubycritic/analysers/complexity'
require 'rubycritic/analysers/churn'
require 'rubycritic/analysers/attributes'

module Rubycritic
  class AnalysersRunner
    ANALYSERS = [
      Analyser::FlaySmells,
      Analyser::FlogSmells,
      Analyser::ReekSmells,
      Analyser::Complexity,
      Analyser::Attributes,
      Analyser::Churn
    ].freeze

    def initialize(paths)
      @paths = paths
    end

    def run
      ANALYSERS.each do |analyser_class|
        analyser_instance = analyser_class.new(analysed_modules)
        puts "running #{analyser_instance}"
        analyser_instance.run
      end
      analysed_modules
    end

    def analysed_modules
      @analysed_modules ||= AnalysedModulesCollection.new(@paths)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubycritic-2.9.2 lib/rubycritic/analysers_runner.rb
rubycritic-2.9.1 lib/rubycritic/analysers_runner.rb
rubycritic-2.9.0 lib/rubycritic/analysers_runner.rb
rubycritic-2.8.0 lib/rubycritic/analysers_runner.rb
rubycritic-2.7.1 lib/rubycritic/analysers_runner.rb
rubycritic-2.7.0 lib/rubycritic/analysers_runner.rb