Sha256: 91375b3040228bdec0a7eedf9d63e4924d2074240d4a0139429acde50ca908d0

Contents?: true

Size: 612 Bytes

Versions: 16

Compression:

Stored size: 612 Bytes

Contents

# frozen_string_literal: true

require_relative '../../commands'

RubyLeiningen::Commands.define_custom_command('kibit') do |config, opts|
  paths = opts[:paths] || []

  config.on_subcommand_builder do |command|
    command = command.with_flag('--replace') if opts[:replace]
    command = command.with_flag('--interactive') if opts[:interactive]
    if opts[:reporter]
      command = command
                .with_option('--reporter', opts[:reporter])
    end
    command
  end
  config.on_command_builder do |subcommand|
    paths.inject(subcommand) do |s, path|
      s.with_argument(path)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ruby_leiningen-0.30.0.pre.2 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.30.0.pre.1 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.29.0 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.28.0.pre.7 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.28.0.pre.6 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.28.0.pre.5 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.28.0.pre.4 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.28.0.pre.3 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.28.0.pre.2 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.28.0.pre.1 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.27.0 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.26.0.pre.2 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.26.0.pre.1 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.25.0 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.24.0.pre.8 lib/ruby_leiningen/commands/plugins/kibit.rb
ruby_leiningen-0.24.0.pre.7 lib/ruby_leiningen/commands/plugins/kibit.rb