Closed thesamet closed 8 years ago
Running the CLI with -alignParameters +doubleIndentClassDeclaration -preserveDanglingCloseParenthesis
- case class MyClass(a: String, - b: String, - c: Option[String]) extends Foo { + case class MyClass( + a: String, + b: String, + c: Option[String] +) extends Foo {
The problem is that the "a: String" line gets two spaces and not 4, as it should due to the +doubleIndentClassDeclaration.
Update: this happens when the above case class is nested with a class. Here is a failing unit test:
{ implicit val formattingPreferences = FormattingPreferences.setPreference(AlignParameters, false) .setPreference(DoubleIndentClassDeclaration, true) """object Foo { | case class Bar(alpha: String, | beta: String, | gamma: String) extends Baz { | } |}""" ==> """object Foo { | case class PersonSignUpRequest( | alpha: String, | beta: String, | gamma: String) extends Baz { | } |}""" }
Thanks for the bug report!
This is fixed on master (duplicate of #187 ).
master
Running the CLI with -alignParameters +doubleIndentClassDeclaration -preserveDanglingCloseParenthesis
The problem is that the "a: String" line gets two spaces and not 4, as it should due to the +doubleIndentClassDeclaration.
Update: this happens when the above case class is nested with a class. Here is a failing unit test: