forked from scalameta/scalafmt
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break line if def equals is at columns + 1
Fixes scalameta#600
- Loading branch information
Showing
2 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
core/src/test/resources/newlines/OffByOneParameterlessMethod.stat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
style = defaultWithAlign | ||
newlines.sometimesBeforeColonInMethodReturnType = false | ||
maxColumn = 32 | ||
<<< equals is at column + 1 | ||
object Test { | ||
//-----------------------------| | ||
def test: Either[String, Int] = Right(0) | ||
} | ||
>>> | ||
object Test { | ||
//-----------------------------| | ||
def test: Either[String, | ||
Int] = | ||
Right(0) | ||
} | ||
<<< SKIP left brace is at column + 1 | ||
object Test { | ||
//-----------------------------| | ||
def ab: Either[String, Int] = { | ||
Right(0) | ||
} | ||
} | ||
>>> | ||
object Test { | ||
//-----------------------------| | ||
def ab: Either[String, | ||
Int] = { | ||
Right(0) | ||
} | ||
} |