Closed zaneli closed 8 years ago
Strange, the code was formatted this way after I added Scalariform.
Oh...sorry, this might occur at only my development environment?
But I guess it seems to be preserveDanglingCloseParenthesis
default behavior.
ref: https://github.com/mdr/scalariform#preservedanglingcloseparenthesis
Yes, it turns out my global Scala-style plugin was interfering with Scalariform and causing this strange behaviour. Removing it and then compiling the code gave me the same changeset so I'll merge this.
@lloydmeta Thank you for merge it, but I am confused...
sbt-scalariform 1.3.0 default settings seems to be (PreserveDanglingCloseParenthesis, true)
.
https://github.com/sbt/sbt-scalariform/blob/7cc74a7a43ccbd766f828a9a7c345c01cf717853/src/main/scala/com/typesafe/sbt/SbtScalariform.scala#L50
Would it be actually reasonable to merge my PR?
I think your changeset is correct in that it formats it in a way that prevents churn due to formatting and reformatting. I just tried clean test:compile
in a fresh dev environment (without any global plugins etc), and got the same results, so I think we are fine here.
If/when Scalariform's default setting change to preserve dangling parens, we can adapt that or decide which way we want to go. I personally am not strongly opinionated as long as the code stays uniform when multiple people contribute.
I see. Thank you so much!
Some differences occurs by running
sbt clean test:compile
because of using sbt-scalariform.I think these should be treated as default, but what do you think?