porkchopclub/porkchop

View on GitHub
app/services/stats/season.rb

Summary

Maintainability
A
0 mins
Test Coverage

Use 2 spaces for indentation in a heredoc by using <<~ instead of <<.
Open

CASE WHEN "points"."victor_id" = "matches"."home_player_id" THEN away_player_id
     ELSE home_player_id
END
SQL
Severity: Minor
Found in app/services/stats/season.rb by rubocop

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