Thomascountz/battle_boats

View on GitHub
lib/battle_boats/fleet.rb

Summary

Maintainability
A
0 mins
Test Coverage

Avoid comma after the last item of an array.
Invalid

        BattleBoats::Ship.new(name: "Destroyer",  length: 2, symbol: "D"),
Severity: Minor
Found in lib/battle_boats/fleet.rb by rubocop

This cop checks for trailing comma in array and hash literals.

Example: EnforcedStyleForMultiline: consistent_comma

# bad
a = [1, 2,]

# good
a = [
  1, 2,
  3,
]

# good
a = [
  1,
  2,
]

Example: EnforcedStyleForMultiline: comma

# bad
a = [1, 2,]

# good
a = [
  1,
  2,
]

Example: EnforcedStyleForMultiline: no_comma (default)

# bad
a = [1, 2,]

# good
a = [
  1,
  2
]

There are no issues that match your filters.

Category
Status