Skip to content

Commit

Permalink
Add test for RedundantParens and trailing commas
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Jan 7, 2024
1 parent ad5b870 commit 2211c7f
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions scalafmt-tests/src/test/resources/rewrite/RedundantParens.stat
Original file line number Diff line number Diff line change
Expand Up @@ -1321,3 +1321,63 @@ object A {
object A {
val a = new A({ case x => x })
}
<<< #3743 trailingCommas = always
rewrite.trailingCommas.style = always
===
object A {
def test =
(
foo,
)
def test =
(
Option(""),
).map(identity)}
>>>
test does not parse
object A {
def test =
foo,
def test =
Option(""), .map(identity)
}
<<< #3743 trailingCommas = never
rewrite.trailingCommas.style = never
===
object A {
def test =
(
foo,
)
def test =
(
Option(""),
).map(identity)}
>>>
test does not parse
object A {
def test =
foo,
def test =
Option(""), .map(identity)
}
<<< #3743 trailingCommas = keep
rewrite.trailingCommas.style = keep
===
object A {
def test =
(
foo,
)
def test =
(
Option(""),
).map(identity)}
>>>
test does not parse
object A {
def test =
foo,
def test =
Option(""), .map(identity)
}

0 comments on commit 2211c7f

Please # to comment.