Sha256: 4e08dcf3841ac0ac21320b27912b202885238278347f070d7a31faf3feda1f1b

Contents?: true

Size: 414 Bytes

Versions: 8

Compression:

Stored size: 414 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}])
      fail 'Rubocop not successful' unless exit_status.zero?
    rescue Encoding::CompatibilityError => exception
      Devtools.notify_metric_violation exception.message
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
devtools-0.1.26 tasks/metrics/rubocop.rake
devtools-0.1.25 tasks/metrics/rubocop.rake
devtools-0.1.24 tasks/metrics/rubocop.rake
devtools-0.1.23 tasks/metrics/rubocop.rake
devtools-0.1.22 tasks/metrics/rubocop.rake
devtools-0.1.21 tasks/metrics/rubocop.rake
devtools-0.1.20 tasks/metrics/rubocop.rake
devtools-0.1.19 tasks/metrics/rubocop.rake