Skip to content

Commit a39ea52

Browse files
authored
deps: bump scalafmt to 3.5.7 (#458)
Also make sure new jsdomtest modules has the correct scalacoptions for styleFix to run.
1 parent 56dd4e8 commit a39ea52

File tree

3 files changed

+30
-27
lines changed

3 files changed

+30
-27
lines changed

.scalafmt.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "3.3.1"
1+
version = "3.5.7"
22
project.git = true
33
runner.dialect = "scala213"
44
assumeStandardLibraryStripMargin = true

build.sbt

+2-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ lazy val runtimeJSDOMTest =
133133
.settings(
134134
publishArtifact := false,
135135
publishLocal := {},
136-
jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv()
136+
jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv(),
137+
sharedSettings
137138
)
138139

139140
lazy val plugin =

plugin/src/test/scala/scoverage/PluginASTSupportTest.scala

+27-25
Original file line numberDiff line numberDiff line change
@@ -93,31 +93,33 @@ class PluginASTSupportTest extends FunSuite with MacroSupport {
9393

9494
test("scoverage component should ignore complex macros #11") {
9595
val compiler = ScoverageCompiler.default
96-
compiler.compileCodeSnippet(s""" object ComplexMacro {
97-
|
98-
| import scala.language.experimental.macros
99-
| import ${macroContextPackageName}.Context
100-
|
101-
| def debug(params: Any*): Unit = macro debugImpl
102-
|
103-
| def debugImpl(c: Context)(params: c.Expr[Any]*) = {
104-
| import c.universe._
105-
|
106-
| val trees = params map {param => (param.tree match {
107-
| case Literal(Constant(_)) => reify { print(param.splice) }
108-
| case _ => reify {
109-
| val variable = c.Expr[String](Literal(Constant(show(param.tree)))).splice
110-
| print(s"$$variable = $${param.splice}")
111-
| }
112-
| }).tree
113-
| }
114-
|
115-
| val separators = (1 until trees.size).map(_ => (reify { print(", ") }).tree) :+ (reify { println() }).tree
116-
| val treesWithSeparators = trees zip separators flatMap {p => List(p._1, p._2)}
117-
|
118-
| c.Expr[Unit](Block(treesWithSeparators.toList, Literal(Constant(()))))
119-
| }
120-
|} """.stripMargin)
96+
compiler.compileCodeSnippet(
97+
s""" object ComplexMacro {
98+
|
99+
| import scala.language.experimental.macros
100+
| import ${macroContextPackageName}.Context
101+
|
102+
| def debug(params: Any*): Unit = macro debugImpl
103+
|
104+
| def debugImpl(c: Context)(params: c.Expr[Any]*) = {
105+
| import c.universe._
106+
|
107+
| val trees = params map {param => (param.tree match {
108+
| case Literal(Constant(_)) => reify { print(param.splice) }
109+
| case _ => reify {
110+
| val variable = c.Expr[String](Literal(Constant(show(param.tree)))).splice
111+
| print(s"$$variable = $${param.splice}")
112+
| }
113+
| }).tree
114+
| }
115+
|
116+
| val separators = (1 until trees.size).map(_ => (reify { print(", ") }).tree) :+ (reify { println() }).tree
117+
| val treesWithSeparators = trees zip separators flatMap {p => List(p._1, p._2)}
118+
|
119+
| c.Expr[Unit](Block(treesWithSeparators.toList, Literal(Constant(()))))
120+
| }
121+
|} """.stripMargin
122+
)
121123
assert(!compiler.reporter.hasErrors)
122124
}
123125

0 commit comments

Comments
 (0)