lib/old_tasks/zebra.rake

Summary

Maintainability
Test Coverage

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

namespace :zebra do
  desc 'Set the kete user password in the zebradb/keteaccess file'
  task :set_keteaccess do
    `htpasswd -cbp #{Rails.root}/zebradb/keteaccess kete #{ENV['ZEBRA_PASSWORD']}`
  end
Severity: Minor
Found in lib/old_tasks/zebra.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.

HACK found
Open

    # HACK: no version flag on zebrasrv, read value out of last line of man entry
Severity: Minor
Found in lib/old_tasks/zebra.rake by fixme

Avoid rescuing without specifying an error class.
Open

      rescue
Severity: Minor
Found in lib/old_tasks/zebra.rake by rubocop

This cop checks for rescuing StandardError. There are two supported styles implicit and explicit. This cop will not register an offense if any error other than StandardError is specified.

Example: EnforcedStyle: implicit

# `implicit` will enforce using `rescue` instead of
# `rescue StandardError`.

# bad
begin
  foo
rescue StandardError
  bar
end

# good
begin
  foo
rescue
  bar
end

# good
begin
  foo
rescue OtherError
  bar
end

# good
begin
  foo
rescue StandardError, SecurityError
  bar
end

Example: EnforcedStyle: explicit (default)

# `explicit` will enforce using `rescue StandardError`
# instead of `rescue`.

# bad
begin
  foo
rescue
  bar
end

# good
begin
  foo
rescue StandardError
  bar
end

# good
begin
  foo
rescue OtherError
  bar
end

# good
begin
  foo
rescue StandardError, SecurityError
  bar
end

Avoid using rescue in its modifier form.
Open

        should_add_record = false if zoom_db.respond_to?(:has_zoom_record?) && zoom_db.has_zoom_record?(the_record_id) rescue false
Severity: Minor
Found in lib/old_tasks/zebra.rake by rubocop

This cop checks for uses of rescue in its modifier form.

Example:

# bad
some_method rescue handle_error

# good
begin
  some_method
rescue
  handle_error
end

Prefer $ERROR_INFO from the stdlib 'English' module (don't forget to require it) over $!.
Open

        puts " Error while adding record to #{prefix} zebra instance (#{$!})."
Severity: Minor
Found in lib/old_tasks/zebra.rake by rubocop

There are no issues that match your filters.

Category
Status