Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test binPack.xxxSite with configStyleArguments #3902

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
255 changes: 255 additions & 0 deletions scalafmt-tests/src/test/resources/newlines/source_classic.stat
Original file line number Diff line number Diff line change
Expand Up @@ -7480,3 +7480,258 @@ object a {
" try {x.add(y, null);} catch(e) {if (typeof(e) == 'object' && typeof(e.number) == 'number' && (e.number & 0xFFFF) == 5){ x.add(y,x.options.length); } } "
}
}
<<< binPack.callSite with configStyleArguments, danglingParentheses
optIn.configStyleArguments = true
danglingParentheses.callSite = true
binPack.unsafeCallSite = always
maxColumn = 30
runner.optimizer.forceConfigStyleMinSpan = 20
===
object Main {
val bar1 = foo1(
10000,
10001, 10002 + 0
)
val bar2 = foo2(
0,
1, 2, 3,
4, 5, 6, 7, 8, 9, 10 + 0)
}
>>>
object Main {
val bar1 = foo1(
10000,
10001,
10002 + 0
)
val bar2 = foo2(
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10 + 0
)
}
<<< binPack.defnSite with configStyleArguments, danglingParentheses
optIn.configStyleArguments = true
danglingParentheses.defnSite = true
binPack.unsafeDefnSite = always
maxColumn = 30
runner.optimizer.forceConfigStyleMinSpan = 20
===
object Main {
def foo1(
x1: X,
x2: X, xs: X*
): Set[Int]
def foo2(
x1: X, x2: X, x3: X,
x4: X, xs: X*
): Set[Int]
def foo3(
x1: X, x2: X, x3: X,
x4: X, xs: X*): Set[Int]
}
>>>
object Main {
def foo1(
x1: X, x2: X, xs: X*
): Set[Int]
def foo2(
x1: X, x2: X, x3: X,
x4: X, xs: X*
): Set[Int]
def foo3(x1: X, x2: X,
x3: X, x4: X, xs: X*)
: Set[Int]
}
<<< binPack.callSite with !configStyleArguments, danglingParentheses
optIn.configStyleArguments = false
danglingParentheses.callSite = true
binPack.unsafeCallSite = always
maxColumn = 30
runner.optimizer.forceConfigStyleMinSpan = 20
===
object Main {
val bar1 = foo1(
10000,
10001, 10002 + 0
)
val bar2 = foo2(
0,
1, 2, 3,
4, 5, 6, 7, 8, 9, 10 + 0)
}
>>>
object Main {
val bar1 = foo1(10000,
10001, 10002 + 0)
val bar2 = foo2(0, 1, 2, 3,
4, 5, 6, 7, 8, 9, 10 + 0)
}
<<< binPack.defnSite with !configStyleArguments, danglingParentheses
optIn.configStyleArguments = false
danglingParentheses.defnSite = true
binPack.unsafeDefnSite = always
maxColumn = 30
runner.optimizer.forceConfigStyleMinSpan = 20
===
object Main {
def foo1(
x1: X,
x2: X, xs: X*
): Set[Int]
def foo2(
x1: X, x2: X, x3: X,
x4: X, xs: X*
): Set[Int]
def foo3(
x1: X, x2: X, x3: X,
x4: X, xs: X*): Set[Int]
}
>>>
object Main {
def foo1(
x1: X, x2: X, xs: X*
): Set[Int]
def foo2(
x1: X, x2: X, x3: X,
x4: X, xs: X*
): Set[Int]
def foo3(
x1: X, x2: X, x3: X,
x4: X, xs: X*
): Set[Int]
}
<<< binPack.callSite with configStyleArguments, !danglingParentheses
optIn.configStyleArguments = true
danglingParentheses.callSite = false
binPack.unsafeCallSite = always
maxColumn = 30
runner.optimizer.forceConfigStyleMinSpan = 20
===
object Main {
val bar1 = foo1(
10000,
10001, 10002 + 0
)
val bar2 = foo2(
0,
1, 2, 3,
4, 5, 6, 7, 8, 9, 10 + 0)
}
>>>
object Main {
val bar1 = foo1(
10000,
10001,
10002 + 0
)
val bar2 = foo2(
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10 + 0
)
}
<<< binPack.defnSite with configStyleArguments, !danglingParentheses
optIn.configStyleArguments = true
danglingParentheses.defnSite = false
binPack.unsafeDefnSite = always
maxColumn = 30
runner.optimizer.forceConfigStyleMinSpan = 20
===
object Main {
def foo1(
x1: X,
x2: X, xs: X*
): Set[Int]
def foo2(
x1: X, x2: X, x3: X,
x4: X, xs: X*
): Set[Int]
def foo3(
x1: X, x2: X, x3: X,
x4: X, xs: X*): Set[Int]
}
>>>
object Main {
def foo1(
x1: X, x2: X, xs: X*
): Set[Int]
def foo2(
x1: X, x2: X, x3: X,
x4: X, xs: X*
): Set[Int]
def foo3(x1: X, x2: X,
x3: X, x4: X, xs: X*)
: Set[Int]
}
<<< binPack.callSite with !configStyleArguments, !danglingParentheses
optIn.configStyleArguments = false
danglingParentheses.callSite = false
binPack.unsafeCallSite = always
maxColumn = 30
runner.optimizer.forceConfigStyleMinSpan = 20
===
object Main {
val bar1 = foo1(
10000,
10001, 10002 + 0
)
val bar2 = foo2(
0,
1, 2, 3,
4, 5, 6, 7, 8, 9, 10 + 0)
}
>>>
object Main {
val bar1 = foo1(10000,
10001, 10002 + 0)
val bar2 = foo2(0, 1, 2, 3,
4, 5, 6, 7, 8, 9, 10 + 0)
}
<<< binPack.defnSite with !configStyleArguments, !danglingParentheses
optIn.configStyleArguments = false
danglingParentheses.defnSite = false
binPack.unsafeDefnSite = always
maxColumn = 30
runner.optimizer.forceConfigStyleMinSpan = 20
===
object Main {
def foo1(
x1: X,
x2: X, xs: X*
): Set[Int]
def foo2(
x1: X, x2: X, x3: X,
x4: X, xs: X*
): Set[Int]
def foo3(
x1: X, x2: X, x3: X,
x4: X, xs: X*): Set[Int]
}
>>>
object Main {
def foo1(x1: X, x2: X,
xs: X*): Set[Int]
def foo2(x1: X, x2: X,
x3: X, x4: X, xs: X*)
: Set[Int]
def foo3(x1: X, x2: X,
x3: X, x4: X, xs: X*)
: Set[Int]
}
Loading
Loading