Sha256: ab5f445d8475ed40469f89d1cecd52fb1bf1cdaff01ad1aebc8d7e387b6ddd5f

Contents?: true

Size: 1.01 KB

Versions: 21

Compression:

Stored size: 1.01 KB

Contents

# frozen_string_literal: true

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'
require 'rubycritic/analysers/coverage'

module RubyCritic
  class AnalysersRunner
    ANALYSERS = [
      Analyser::FlaySmells,
      Analyser::FlogSmells,
      Analyser::ReekSmells,
      Analyser::Complexity,
      Analyser::Attributes,
      Analyser::Churn,
      Analyser::Coverage
    ].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

21 entries across 21 versions & 2 rubygems

Version Path
rubycritic-4.9.1 lib/rubycritic/analysers_runner.rb
rubycritic-4.9.0 lib/rubycritic/analysers_runner.rb
rubycritic-4.8.1 lib/rubycritic/analysers_runner.rb
rubycritic-4.8.0 lib/rubycritic/analysers_runner.rb
rubycritic-4.7.0 lib/rubycritic/analysers_runner.rb
rubycritic-4.6.1 lib/rubycritic/analysers_runner.rb
rubycritic-4.6.0 lib/rubycritic/analysers_runner.rb
rubycritic-4.5.2 lib/rubycritic/analysers_runner.rb
rubycritic-4.5.1 lib/rubycritic/analysers_runner.rb
rubycritic-4.5.0 lib/rubycritic/analysers_runner.rb
rubycritic-4.4.1 lib/rubycritic/analysers_runner.rb
rubycritic-4.4.0 lib/rubycritic/analysers_runner.rb
rubycritic-4.3.3 lib/rubycritic/analysers_runner.rb
rubycritic-4.3.2 lib/rubycritic/analysers_runner.rb
rubycritic-4.3.1 lib/rubycritic/analysers_runner.rb
rubycritic-4.3.0 lib/rubycritic/analysers_runner.rb
rubycritic-4.2.2 lib/rubycritic/analysers_runner.rb
rubycritic-4.2.1 lib/rubycritic/analysers_runner.rb
rubycritic-4.2.0 lib/rubycritic/analysers_runner.rb
rubycritic-simplecov-4.1.1 lib/rubycritic/analysers_runner.rb