Sha256: acc666a81c5cd6c3cbb47fab7be3bb4626262ec46aa3e8d77639800aa4afe7c6

Contents?: true

Size: 419 Bytes

Versions: 15

Compression:

Stored size: 419 Bytes

Contents

namespace :metrics do
  desc 'Check with code style guide'
  task :rubocop do
    require 'rubocop'
    config = Devtools.project.rubocop
    begin
      exit_status = RuboCop::CLI.new.run(%W[--config #{config.config_file.to_s}])
      fail 'Rubocop not successful' unless exit_status.zero?
    rescue Encoding::CompatibilityError => exception
      Devtools.notify_metric_violation exception.message
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
devtools-0.1.18 tasks/metrics/rubocop.rake
devtools-0.1.16 tasks/metrics/rubocop.rake
devtools-0.1.15 tasks/metrics/rubocop.rake
devtools-0.1.14 tasks/metrics/rubocop.rake
devtools-0.1.13 tasks/metrics/rubocop.rake
devtools-0.1.12 tasks/metrics/rubocop.rake
devtools-0.1.11 tasks/metrics/rubocop.rake
devtools-0.1.10 tasks/metrics/rubocop.rake
devtools-0.1.9 tasks/metrics/rubocop.rake
devtools-0.1.8 tasks/metrics/rubocop.rake
devtools-0.1.7 tasks/metrics/rubocop.rake
devtools-0.1.6 tasks/metrics/rubocop.rake
devtools-0.1.5 tasks/metrics/rubocop.rake
devtools-0.1.4 tasks/metrics/rubocop.rake
devtools-0.1.3 tasks/metrics/rubocop.rake