Skip to content

Commit

Permalink
refactor: remove Layout/SpaceBeforeBlockBraces rubocop todos
Browse files Browse the repository at this point in the history
  • Loading branch information
thestelz committed Oct 14, 2022
1 parent c8c734f commit 377cf63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
9 changes: 0 additions & 9 deletions .rubocop_todo.yml
Expand Up @@ -6,15 +6,6 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
# SupportedStyles: space, no_space
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceBeforeBlockBraces:
Exclude:
- 'test/geos_capi/polygon_test.rb'

# Offense count: 8
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
Lint/DuplicateBranch:
Expand Down
10 changes: 5 additions & 5 deletions test/geos_capi/polygon_test.rb
Expand Up @@ -125,14 +125,14 @@ def test_buffer_with_style

def test_is_valid_polygon
polygon_coordinates = [[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]
points_arr = polygon_coordinates.map{ |v| @factory.point(v[0], v[1]) }
points_arr = polygon_coordinates.map { |v| @factory.point(v[0], v[1]) }
outer_ring = @factory.linear_ring(points_arr)
polygon = @factory.polygon(outer_ring)

assert_equal(polygon.valid?, true)

polygon_coordinates = [[-1, -1], [-1, 0], [1, 0], [1, 1], [0, 1], [0, -1], [-1, -1]]
points_arr = polygon_coordinates.map{ |v| @factory.point(v[0], v[1]) }
points_arr = polygon_coordinates.map { |v| @factory.point(v[0], v[1]) }
outer_ring = @factory.linear_ring(points_arr)
polygon = @factory.polygon(outer_ring)

Expand All @@ -141,7 +141,7 @@ def test_is_valid_polygon

def test_invalid_reason
polygon_coordinates = [[-1, -1], [-1, 0], [1, 0], [1, 1], [0, 1], [0, -1], [-1, -1]]
points_arr = polygon_coordinates.map{ |v| @factory.point(v[0], v[1]) }
points_arr = polygon_coordinates.map { |v| @factory.point(v[0], v[1]) }
outer_ring = @factory.linear_ring(points_arr)
polygon = @factory.polygon(outer_ring)

Expand All @@ -150,7 +150,7 @@ def test_invalid_reason

def test_invalid_reason_with_valid_polygon
polygon_coordinates = [[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]
points_arr = polygon_coordinates.map{ |v| @factory.point(v[0], v[1]) }
points_arr = polygon_coordinates.map { |v| @factory.point(v[0], v[1]) }
outer_ring = @factory.linear_ring(points_arr)
polygon = @factory.polygon(outer_ring)
assert_nil(polygon.invalid_reason)
Expand All @@ -159,7 +159,7 @@ def test_invalid_reason_with_valid_polygon
def test_self_intersecting_polygon
# issue 218
polygon_coordinates = [[0, 0], [1, 1], [0, 1], [1, 0], [0, 0]]
points_arr = polygon_coordinates.map{ |v| @factory.point(v[0], v[1]) }
points_arr = polygon_coordinates.map { |v| @factory.point(v[0], v[1]) }
outer_ring = @factory.linear_ring(points_arr)
polygon = @factory.polygon(outer_ring)

Expand Down

0 comments on commit 377cf63

Please sign in to comment.