lib/tasks/sidekiq.rake
Block has too many lines. [103/25] Open
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
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
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))
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Open
sidekiq_config = YAML.load(File.read(sidekiq_config_file))
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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")