You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please paste the contents of your .scalafmt.conf file here:
version = 3.8.1
runner.dialect = scala212source3
maxColumn = 120
project.git = true
# http://docs.scala-lang.org/style/scaladoc.html recommends the JavaDoc style.
# scala/scala is written that way too https://github.com/scala/scala/blob/v2.12.2/src/library/scala/Predef.scala
docstrings.style = Asterisk
literals.hexDigits = upper
project.layout = StandardConvention
Command-line parameters (required)
When I run scalafmt via CLI like this: scalafmt
Steps
Given code like this:
// #slickQueryImplicitJoinvalslick2=// #slickQueryImplicitJoin// or equivalent for-expression:
(for (
p <- people
a <- addresses if p.addressId === a.id
) yield (p.name, a.city)).result
// #slickQueryImplicitJoinval ((sqlRes, slickRes), slick2Res) =Await.result(db.run(sql zip slick zip slick2), Duration.Inf)
assert(sqlRes == slickRes)
assert(slickRes == slick2Res)
assert(sqlRes.size >0)
Problem
Scalafmt fails with
org.scalafmt.dynamic.exceptions.PositionExceptionImpl: /Users/mdedetrich/github/slick/doc/code/SqlToSlick.scala:287: error: [dialect scala3] `)` expected but `<-` found
p <- people58 source files formatted
^: /Users/mdedetrich/github/slick/doc/code/SqlToSlick.scala
Expectation
I would expect scalafmt to not fail
Workaround
Turning the formatting off with // format: off works
Notes
Changing the dialect with different dialects using fileOverride { "glob:**/doc/**.scala" = scala212 } doesn't have any effect, so it seems unrelated to dialect.
Configuration (required)
Please paste the contents of your
.scalafmt.conf
file here:Command-line parameters (required)
When I run scalafmt via CLI like this:
scalafmt
Steps
Given code like this:
Problem
Scalafmt fails with
Expectation
I would expect scalafmt to not fail
Workaround
Turning the formatting off with
// format: off
worksNotes
Changing the dialect with different dialects using
fileOverride { "glob:**/doc/**.scala" = scala212 }
doesn't have any effect, so it seems unrelated to dialect.See original PR at slick/slick#2909
The text was updated successfully, but these errors were encountered: