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

dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 69c2c34  [SPARK-38153][BUILD] Remove option 
newlines.topLevelStatements in scalafmt.conf
69c2c34 is described below

commit 69c2c34e80a21927c3ca3664c477748ff47a3804
Author: Gengliang Wang <[email protected]>
AuthorDate: Tue Feb 8 23:01:24 2022 -0800

    [SPARK-38153][BUILD] Remove option newlines.topLevelStatements in 
scalafmt.conf
    
    ### What changes were proposed in this pull request?
    
    Remove option newlines.topLevelStatements in scalafmt.conf
    
    ### Why are the changes needed?
    
    The configuration
    ```
    newlines.topLevelStatements = [before,after]
    ```
    is to add a blank line before the first member or after the last member of 
the class. This is neither encouraged nor discouraged as per 
https://github.com/databricks/scala-style-guide#blanklines
    
    **Without the conf, scalafmt will still add blank lines between consecutive 
members (or initializers) of a class.**
    
    As I tried running the script `./dev/scalafmt`, I saw unnessary blank lines
    
![image](https://user-images.githubusercontent.com/1097932/153122925-3238f15c-312b-4973-8e2d-92978bf5c6ad.png)
    
    ### Does this PR introduce _any_ user-facing change?
    
    No
    
    ### How was this patch tested?
    
    Manual test
    
    Closes #35455 from gengliangwang/removeToplevelLine.
    
    Authored-by: Gengliang Wang <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 dev/.scalafmt.conf | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dev/.scalafmt.conf b/dev/.scalafmt.conf
index 9598540..d2196e6 100644
--- a/dev/.scalafmt.conf
+++ b/dev/.scalafmt.conf
@@ -25,4 +25,3 @@ optIn = {
 danglingParentheses = false
 docstrings = JavaDoc
 maxColumn = 98
-newlines.topLevelStatements = [before,after]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to