lib/tasks/rabid.rake

Summary

Maintainability
Test Coverage

Block has too many lines. [49/25]
Open

namespace :rabid do
  desc 'Merges users who have multiple accounts on same email address.'
  task fixup_duplicate_users: :environment do
    all_emails = User.select(:email).all.map(&:email)
    log("There are #{all_emails.count} accounts in the system")
Severity: Minor
Found in lib/tasks/rabid.rake by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Assignment Branch Condition size for change_has_many is too high. [20.1/15]
Open

  def change_has_many(instances, from_user, to_user)
    log("User #{from_user.id} is referenced from the following model ids: #{instances.map(&:id)}")

    instances.each do |instance|
      log("Editing #{instance.id} to replace User #{from_user.id}) with User #{to_user.id} ")
Severity: Minor
Found in lib/tasks/rabid.rake by rubocop

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

There are no issues that match your filters.

Category
Status