Sha256: 9f818ca4b00acbdff4a42a2b027d800cdbc4a1f62102d16d1793f0c619bd57f9

Contents?: true

Size: 659 Bytes

Versions: 1

Compression:

Stored size: 659 Bytes

Contents

# encoding: utf-8

require "rubocop/rake_task"

module ReevooCop
  class RakeTask < RuboCop::RakeTask
    def initialize(*args, &task_block) # rubocop:disable Metrics/AbcSize
      setup_ivars(args)

      desc "Run RuboCop" unless ::Rake.application.last_description

      task(name, *args) do |_, task_args|
        RakeFileUtils.send(:verbose, verbose) do
          yield(*[self, task_args].slice(0, task_block.arity)) if block_given?
          run_main_task(verbose)
        end
      end

      setup_subtasks(name, *args, &task_block)
    end

    def run_cli(verbose, options)
      require "reevoocop"
      super(verbose, options)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reevoocop-0.0.9 lib/reevoocop/rake_task.rb