Skip to content

Commit ba27b8f

Browse files
GH-48386: [Ruby][Dev] Enable Layout/TrailingEmptyLines: final_newline cop (#48392)
### Rationale for this change This fix introduces new Ruby formatting checks to streamline multi-person development. ### What changes are included in this PR? Enable [`Layout/TrailingEmptyLines`](https://docs.rubocop.org/rubocop/cops_layout.html#layouttrailingemptylines) options ```ruby # `final_newline` looks for one newline at the end of files. # bad class Foo; end # EOF # bad class Foo; end # EOF # good class Foo; end # EOF ``` ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #48386 Authored-by: Hiroyuki Sato <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 4723b79 commit ba27b8f

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ Layout/ArgumentAlignment:
3131

3232
Layout/SpaceAfterComma:
3333
Enabled: true
34+
35+
Layout/TrailingEmptyLines:
36+
Enabled: true

c_glib/test/test-assume-timezone-options.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,3 @@ def test_assume_timezone_function
5858
result.value_data_type)
5959
end
6060
end
61-

c_glib/test/test-cumulative-options.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,3 @@ def test_cumulative_sum_with_start
6161
cumulative_sum_function.execute(args, @options).value)
6262
end
6363
end
64-

c_glib/test/test-dictionary-encode-options.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ def test_dictionary_encode_function_with_encode
4343
assert_equal(build_int32_array([0, 1, 2, 0, 1]), result.indices)
4444
end
4545
end
46-

0 commit comments

Comments
 (0)