This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new ba27b8fe53 GH-48386: [Ruby][Dev] Enable Layout/TrailingEmptyLines: 
final_newline cop (#48392)
ba27b8fe53 is described below

commit ba27b8fe5311296ce98a92f8763cc98e2f0bfd56
Author: Hiroyuki Sato <[email protected]>
AuthorDate: Mon Dec 8 13:31:45 2025 +0900

    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]>
---
 .rubocop.yml                                  | 3 +++
 c_glib/test/test-assume-timezone-options.rb   | 1 -
 c_glib/test/test-cumulative-options.rb        | 1 -
 c_glib/test/test-dictionary-encode-options.rb | 1 -
 4 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.rubocop.yml b/.rubocop.yml
index 3f48689796..1716d6a637 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -31,3 +31,6 @@ Layout/ArgumentAlignment:
 
 Layout/SpaceAfterComma:
   Enabled: true
+
+Layout/TrailingEmptyLines:
+  Enabled: true
diff --git a/c_glib/test/test-assume-timezone-options.rb 
b/c_glib/test/test-assume-timezone-options.rb
index ac2e1b8615..10bf4261d3 100644
--- a/c_glib/test/test-assume-timezone-options.rb
+++ b/c_glib/test/test-assume-timezone-options.rb
@@ -58,4 +58,3 @@ class TestAssumeTimezoneOptions < Test::Unit::TestCase
                  result.value_data_type)
   end
 end
-
diff --git a/c_glib/test/test-cumulative-options.rb 
b/c_glib/test/test-cumulative-options.rb
index 9b25efd55f..a6e7e0e6c0 100644
--- a/c_glib/test/test-cumulative-options.rb
+++ b/c_glib/test/test-cumulative-options.rb
@@ -61,4 +61,3 @@ class TestCumulativeOptions < Test::Unit::TestCase
                  cumulative_sum_function.execute(args, @options).value)
   end
 end
-
diff --git a/c_glib/test/test-dictionary-encode-options.rb 
b/c_glib/test/test-dictionary-encode-options.rb
index 6ab6cdd2e4..e516383d62 100644
--- a/c_glib/test/test-dictionary-encode-options.rb
+++ b/c_glib/test/test-dictionary-encode-options.rb
@@ -43,4 +43,3 @@ class TestDictionaryEncodeOptions < Test::Unit::TestCase
     assert_equal(build_int32_array([0, 1, 2, 0, 1]), result.indices)
   end
 end
-

Reply via email to