Skip to content

Commit

Permalink
Merge pull request #375 from scala-steward/update/scalafmt-core-2.7.5
Browse files Browse the repository at this point in the history
Update scalafmt-core to 2.7.5
  • Loading branch information
raboof authored Nov 16, 2020
2 parents 849436c + a50393e commit b0fd7d3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 2.6.4
version = 2.7.5

align.preset = true
danglingParentheses.preset = true
Expand Down
11 changes: 5 additions & 6 deletions parser/src/test/scala/play/twirl/parser/test/ParserSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ class ParserSpec extends AnyWordSpec with Matchers with Inside {
}

def parseFailure(templateName: String, message: String, line: Int, column: Int) =
inside(parse(templateName)) {
case parser.Error(_, rest, errors) =>
val e = errors.head
e.str mustBe message
e.pos.line mustBe line
e.pos.column mustBe column
inside(parse(templateName)) { case parser.Error(_, rest, errors) =>
val e = errors.head
e.str mustBe message
e.pos.line mustBe line
e.pos.column mustBe column
}

def parseTemplate(templateName: String): Template = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ class TemplateMappingSpec extends AnyWordSpec with Matchers with Inspectors {
10 -> Location(4, 1, 7, "d")
)

forAll(testOffsets) {
case (offset, location) =>
mapping.location(offset) mustBe Some(location)
forAll(testOffsets) { case (offset, location) =>
mapping.location(offset) mustBe Some(location)
}

val testPositions = Seq(
Expand All @@ -63,9 +62,8 @@ class TemplateMappingSpec extends AnyWordSpec with Matchers with Inspectors {
(5, 0) -> Location(4, 1, 7, "d")
)

forAll(testPositions) {
case ((line, column), location) =>
mapping.location(line, column) mustBe Some(location)
forAll(testPositions) { case ((line, column), location) =>
mapping.location(line, column) mustBe Some(location)
}
}
}
Expand Down

0 comments on commit b0fd7d3

Please sign in to comment.