diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index a5b66a87..36dff843 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -21,3 +21,6 @@ c3b04b90d9863ca2c7b7e56bc0bda148ce392642 # Scala Steward: Reformat with scalafmt 3.10.2 b023f22d7c3d7c29d6a69d3ff6a258cdc44a1b78 + +# Scala Steward: Reformat with scalafmt 3.10.3 +0d36cbc27a3e478bd7bffc1183d936d83fd01d70 diff --git a/.scalafmt.conf b/.scalafmt.conf index e1625295..1754ecd3 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.10.2 +version = 3.10.3 project.layout=StandardConvention diff --git a/docs/manual/working/scalaGuide/main/templates/code/ScalaTemplates.scala b/docs/manual/working/scalaGuide/main/templates/code/ScalaTemplates.scala index 28ce5608..6333ca13 100644 --- a/docs/manual/working/scalaGuide/main/templates/code/ScalaTemplates.scala +++ b/docs/manual/working/scalaGuide/main/templates/code/ScalaTemplates.scala @@ -36,8 +36,8 @@ object ScalaTemplatesSpec extends Specification { val customer = Customer("mr customer") val orders = List(Order("foo"), Order("bar")) - "Scala templates" should { - "support an example template" in { + "Scala templates".should { + "support an example template".in { val c = Customer("mr customer") val o = List(Order("foo"), Order("bar")) @@ -47,12 +47,12 @@ object ScalaTemplatesSpec extends Specification { // #invoke-template val body = content.body - body must contain("mr customer") - body must contain("foo") - body must contain("bar") + body.must(contain("mr customer")) + body.must(contain("foo")) + body.must(contain("bar")) } - "support string interpolation" in { + "support string interpolation".in { // #string-interpolation import play.twirl.api.StringInterpolation @@ -60,47 +60,47 @@ object ScalaTemplatesSpec extends Specification { val p = html"
Hello $name
" // #string-interpolation - p.body must_== "Hello Martin
" + p.body.must_==("Hello Martin
") } - "allow simple parameters" in { + "allow simple parameters".in { val body = html.simpleParameters(customer, orders).body - body must contain(customer.toString) - body must contain(orders(0).toString) - body must contain(orders(1).toString) + body.must(contain(customer.toString)) + body.must(contain(orders(0).toString)) + body.must(contain(orders(1).toString)) } - "allow default parameters" in { - html.defaultParameters("foo").body must contain("foo") - html.defaultParameters().body must contain("Home") + "allow default parameters".in { + html.defaultParameters("foo").body.must(contain("foo")) + html.defaultParameters().body.must(contain("Home")) } - "allow curried parameters" in { + "allow curried parameters".in { val body = html.curriedParameters("foo")(Html("bar")).body - body must contain("foo") - body must contain("bar") + body.must(contain("foo")) + body.must(contain("bar")) } - "allow constructors" in { + "allow constructors".in { val body = new html.constructor(MyComponent())(customer, orders).body - body must contain("MyComponent") - body must contain(customer.toString) - body must contain(orders(0).toString) - body must contain(orders(1).toString) + body.must(contain("MyComponent")) + body.must(contain(customer.toString)) + body.must(contain(orders(0).toString)) + body.must(contain(orders(1).toString)) } - "allow import statements" in { - html.importStatement(customer, orders).body must contain("import working") + "allow import statements".in { + html.importStatement(customer, orders).body.must(contain("import working")) } - "allow absolute import statements" in { - html.importStatement(customer, orders).body must contain("absolute import is working") + "allow absolute import statements".in { + html.importStatement(customer, orders).body.must(contain("absolute import is working")) } - "allow comments on the first line" in { + "allow comments on the first line".in { val body = html.firstLineComment("blah").body - body must contain("blah") - body must not contain "Home page" + body.must(contain("blah")) + body.must(not).contain("Home page") } { @@ -113,54 +113,54 @@ object ScalaTemplatesSpec extends Specification { .mkString("\n") } - "allow escaping the @ character" in { - body must contain("bob@example.com") + "allow escaping the @ character".in { + body.must(contain("bob@example.com")) } - "allow iterating" in { - segment("for-loop") must contain("p1 ($1)") - segment("for-loop") must contain("p2 ($2)") + "allow iterating".in { + segment("for-loop").must(contain("p1 ($1)")) + segment("for-loop").must(contain("p2 ($2)")) } - "allow conditionals" in { - body must contain("2 items!") + "allow conditionals".in { + body.must(contain("2 items!")) } - "allow reusable code blocks" in { - segment("reusable") must contain("p1 ($1)") - segment("reusable") must contain("p2 ($2)") + "allow reusable code blocks".in { + segment("reusable").must(contain("p1 ($1)")) + segment("reusable").must(contain("p2 ($2)")) } - "allow pure scala reusable code blocks" in { - body must contain("Hello World") + "allow pure scala reusable code blocks".in { + body.must(contain("Hello World")) } - "allow declaring implicit variables" in { - body must contain("implicit working") + "allow declaring implicit variables".in { + body.must(contain("implicit working")) } - "allow defining variables" in { - body must contain("Hello John Doe") + "allow defining variables".in { + body.must(contain("Hello John Doe")) } - "allow comments" in { - body must not contain "This is a comment" + "allow comments".in { + body.must(not).contain("This is a comment") } - "allow intering raw HTML" in { - body must contain("