Skip to content

Commit ec610f1

Browse files
committed
style: fix scalafmt error
1 parent fe0c080 commit ec610f1

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

plugin/src/main/scala/scoverage/ScoveragePlugin.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,10 @@ class ScoverageInstrumentationComponent(
853853
*
854854
* This will instrument the user expression (if-else with arrow calls).
855855
*/
856-
case v: ValDef if v.symbol.isSynthetic && v.rhs.pos.isDefined && containsNonSynthetic(v.rhs) =>
856+
case v: ValDef
857+
if v.symbol.isSynthetic && v.rhs.pos.isDefined && containsNonSynthetic(
858+
v.rhs
859+
) =>
857860
treeCopy.ValDef(tree, v.mods, v.name, v.tpt, process(v.rhs))
858861

859862
/** <synthetic> val default: A1 => B1 =

plugin/src/test/scala/scoverage/PluginCoverageTest.scala

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,9 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
381381
compiler.assertNMeasuredStatements(11)
382382
}
383383

384-
test("plugin should handle return pattern matching assignment https://github.com/scoverage/scalac-scoverage-plugin/issues/123") {
384+
test(
385+
"plugin should handle return pattern matching assignment https://github.com/scoverage/scalac-scoverage-plugin/issues/123"
386+
) {
385387
val compiler = ScoverageCompiler.default
386388
compiler.compileCodeSnippet(
387389
"""
@@ -396,15 +398,15 @@ class PluginCoverageTest extends FunSuite with MacroSupport {
396398
)
397399
assert(!compiler.reporter.hasErrors)
398400
assert(!compiler.reporter.hasWarnings)
399-
/**
400-
* WITHOUT the bugfix:
401-
* 2 when assigning value to "a" and "b"
402-
* 1 at the end of the function
403-
* WITH the bugfix, it will additionally include
404-
* 2 from then branch
405-
* 2 from else branch
406-
* 2 from synthetic code generated for pattern matching assignment
407-
*/
401+
402+
/** WITHOUT the bugfix:
403+
* 2 when assigning value to "a" and "b"
404+
* 1 at the end of the function
405+
* WITH the bugfix, it will additionally include
406+
* 2 from then branch
407+
* 2 from else branch
408+
* 2 from synthetic code generated for pattern matching assignment
409+
*/
408410
compiler.assertNMeasuredStatements(9)
409411
}
410412

0 commit comments

Comments
 (0)