dpn-admin/dpn-sync

View on GitHub
lib/tasks/sidekiq.rake

Summary

Maintainability
Test Coverage

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

namespace :sidekiq do
  namespace :service do
    sidekiq_config_file = File.join('config', 'sidekiq.yml')
    sidekiq_config_file = File.expand_path(sidekiq_config_file)
    if File.exist? sidekiq_config_file
Severity: Minor
Found in lib/tasks/sidekiq.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.

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

  namespace :service do
    sidekiq_config_file = File.join('config', 'sidekiq.yml')
    sidekiq_config_file = File.expand_path(sidekiq_config_file)
    if File.exist? sidekiq_config_file
      sidekiq_config = YAML.load(File.read(sidekiq_config_file))
Severity: Minor
Found in lib/tasks/sidekiq.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.

Prefer using YAML.safe_load over YAML.load.
Open

      sidekiq_config = YAML.load(File.read(sidekiq_config_file))
Severity: Minor
Found in lib/tasks/sidekiq.rake by rubocop

This cop checks for the use of YAML class methods which have potential security issues leading to remote code execution when loading from an untrusted source.

Example:

# bad
YAML.load("--- foo")

# good
YAML.safe_load("--- foo")
YAML.dump("foo")

There are no issues that match your filters.

Category
Status