kaminari/kaminari

View on GitHub
kaminari-core/lib/generators/kaminari/config_generator.rb

Summary

Maintainability
A
0 mins
Test Coverage

Line is too long. [82/80]
Open

      source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))

Use 2 spaces for indentation in a heredoc by using some library(e.g. ActiveSupport's String#strip_heredoc).
Open

Description:
    Copies Kaminari configuration file to your application's initializer directory.
DESC

This cops checks the indentation of the here document bodies. The bodies are indented one step. In Ruby 2.3 or newer, squiggly heredocs (<<~) should be used. If you use the older rubies, you should introduce some library to your project (e.g. ActiveSupport, Powerpack or Unindent). Note: When Metrics/LineLength's AllowHeredoc is false(not default), this cop does not add any offenses for long here documents to avoid Metrics/LineLength's offenses.

Example:

# bad
<<-RUBY
something
RUBY

# good
# When EnforcedStyle is squiggly, bad code is auto-corrected to the
# following code.
<<~RUBY
  something
RUBY

# good
# When EnforcedStyle is active_support, bad code is auto-corrected to
# the following code.
<<-RUBY.strip_heredoc
  something
RUBY

There are no issues that match your filters.

Category
Status