Sha256: 0e760f9582aed0461e357572015086809d9edb3ab310a75835090d1c2732b969

Contents?: true

Size: 538 Bytes

Versions: 2

Compression:

Stored size: 538 Bytes

Contents

# frozen_string_literal: true

require 'rubocop'

module Slimembedcop
  # Command line interface for Slimembedcop.
  class Cli
    def initialize(argv)
      @argv = argv
    end

    def run
      options = Option.new(@argv)
      formatter = ::RuboCop::Formatter::ProgressFormatter.new($stdout, color: options.color)
      config = ConfigGenerator.new(options).run
      paths = PathFinder.new(options, config).run
      offenses = Runner.new(paths, formatter, options, config).run
      exit(offenses.empty? ? 0 : 1)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slimembedcop-1.0.0 lib/slimembedcop/cli.rb
slimembedcop-0.2.0 lib/slimembedcop/cli.rb