Skip to content

deps: bump scalafmt to 3.5.7 #458

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

Merged
merged 1 commit into from
May 29, 2022
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
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.3.1"
version = "3.5.7"
project.git = true
runner.dialect = "scala213"
assumeStandardLibraryStripMargin = true
Expand Down
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ lazy val runtimeJSDOMTest =
.settings(
publishArtifact := false,
publishLocal := {},
jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv()
jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv(),
sharedSettings
)

lazy val plugin =
Expand Down
52 changes: 27 additions & 25 deletions plugin/src/test/scala/scoverage/PluginASTSupportTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,31 +93,33 @@ class PluginASTSupportTest extends FunSuite with MacroSupport {

test("scoverage component should ignore complex macros #11") {
val compiler = ScoverageCompiler.default
compiler.compileCodeSnippet(s""" object ComplexMacro {
|
| import scala.language.experimental.macros
| import ${macroContextPackageName}.Context
|
| def debug(params: Any*): Unit = macro debugImpl
|
| def debugImpl(c: Context)(params: c.Expr[Any]*) = {
| import c.universe._
|
| val trees = params map {param => (param.tree match {
| case Literal(Constant(_)) => reify { print(param.splice) }
| case _ => reify {
| val variable = c.Expr[String](Literal(Constant(show(param.tree)))).splice
| print(s"$$variable = $${param.splice}")
| }
| }).tree
| }
|
| val separators = (1 until trees.size).map(_ => (reify { print(", ") }).tree) :+ (reify { println() }).tree
| val treesWithSeparators = trees zip separators flatMap {p => List(p._1, p._2)}
|
| c.Expr[Unit](Block(treesWithSeparators.toList, Literal(Constant(()))))
| }
|} """.stripMargin)
compiler.compileCodeSnippet(
s""" object ComplexMacro {
|
| import scala.language.experimental.macros
| import ${macroContextPackageName}.Context
|
| def debug(params: Any*): Unit = macro debugImpl
|
| def debugImpl(c: Context)(params: c.Expr[Any]*) = {
| import c.universe._
|
| val trees = params map {param => (param.tree match {
| case Literal(Constant(_)) => reify { print(param.splice) }
| case _ => reify {
| val variable = c.Expr[String](Literal(Constant(show(param.tree)))).splice
| print(s"$$variable = $${param.splice}")
| }
| }).tree
| }
|
| val separators = (1 until trees.size).map(_ => (reify { print(", ") }).tree) :+ (reify { println() }).tree
| val treesWithSeparators = trees zip separators flatMap {p => List(p._1, p._2)}
|
| c.Expr[Unit](Block(treesWithSeparators.toList, Literal(Constant(()))))
| }
|} """.stripMargin
)
assert(!compiler.reporter.hasErrors)
}

Expand Down