znamenica/dneslov

View on GitHub
lib/tasks/book.rake

Summary

Maintainability
Test Coverage

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

   desc "Generate calendary PDF with args"
Severity: Minor
Found in lib/tasks/book.rake by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

%i-literals should be delimited by [ and ].
Open

   task :pdf, %i(name calendary dates year) => :environment do |t, args|
Severity: Minor
Found in lib/tasks/book.rake by rubocop

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

Unused block argument - t. If it's necessary, use _ or _t as an argument name to indicate that it won't be used.
Open

   task :pdf, %i(name calendary dates year) => :environment do |t, args|
Severity: Minor
Found in lib/tasks/book.rake by rubocop

This cop checks for unused block arguments.

Example:

# bad

do_something do |used, unused|
  puts used
end

do_something do |bar|
  puts :foo
end

define_method(:foo) do |bar|
  puts :baz
end

Example:

#good

do_something do |used, _unused|
  puts used
end

do_something do
  puts :foo
end

define_method(:foo) do |_bar|
  puts :baz
end

There are no issues that match your filters.

Category
Status