Sha256: 2ce0659c7aad8933603ca141f47ccb924a4506b3e71f623f5cc8fe77cecab401

Contents?: true

Size: 916 Bytes

Versions: 7

Compression:

Stored size: 916 Bytes

Contents

require "rubycritic/source_locator"
require "rubycritic/core/analysed_module"
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
    ]

    def initialize(paths)
      @paths = paths
    end

    def run
      ANALYSERS.each { |analyser| analyser.new(analysed_modules).run }
      analysed_modules
    end

    def analysed_modules
      @analysed_modules ||= SourceLocator.new(@paths).pathnames.map do |pathname|
        AnalysedModule.new(:pathname => pathname)
      end
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rubycritic-2.2.0 lib/rubycritic/analysers_runner.rb
rubycritic-2.1.0 lib/rubycritic/analysers_runner.rb
rubycritic-2.0.0 lib/rubycritic/analysers_runner.rb
rubycritic-1.4.0 lib/rubycritic/analysers_runner.rb
rubycritic-1.3.0 lib/rubycritic/analysers_runner.rb
rubycritic-1.2.1 lib/rubycritic/analysers_runner.rb
rubycritic-1.2.0 lib/rubycritic/analysers_runner.rb