kaminari-core/lib/generators/kaminari/config_generator.rb
Line is too long. [82/80] Open
Open
source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
- Exclude checks
Use 2 spaces for indentation in a heredoc by using some library(e.g. ActiveSupport's String#strip_heredoc
). Open
Open
Description:
Copies Kaminari configuration file to your application's initializer directory.
DESC
- Read upRead up
- Exclude checks
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