We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This template is a guideline, not a strict requirement.
sbt scalafmtAll
version = 2.6.0 align = more maxColumn = 120 docstrings = ScalaDoc align.openParenCallSite = true align.openParenDefnSite = true align.tokens = [ {code = "=>", owner = "Case"}, {code = "%", owner = "Term.ApplyInfix"}, {code = "%%", owner = "Term.ApplyInfix"} ] newlines.alwaysBeforeTopLevelStatements = true rewrite.rules = [PreferCurlyFors, SortImports] optIn.breakChainOnFirstMethodDot = false
Given code like this:
class Test { val testCases = List( ("Old state", "Campaign data", "Expected state"), ( 1, 2, 3 ) ) }
When I run scalafmt like this:
Error is thrown:
[error] .../Test.scala:7: error: Unable to format file due to bug in scalafmt [error] ( [error] ^: ...Test.scala
I would like the code to be formatted
I've found that by not letting single bracket to be on the line, the formatter will work. e.g.:
class Test { val testCases = List( ("Old state", "Campaign data", "Expected state"), (1, 2, 3) ) }
Used org.scalameta:sbt-scalafmt_2.12:2.4.0 plugin version. Original code, on which scalafmt fails, is valid and compiles. With 2.5.3 it works fine
org.scalameta:sbt-scalafmt_2.12:2.4.0
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
This template is a guideline, not a strict requirement.
sbt scalafmtAll
via terminalSteps
Given code like this:
When I run scalafmt like this:
Problem
Error is thrown:
[error] .../Test.scala:7: error: Unable to format file due to bug in scalafmt [error] ( [error] ^: ...Test.scala
Expectation
I would like the code to be formatted
Workaround
I've found that by not letting single bracket to be on the line, the formatter will work. e.g.:
Notes
Used
org.scalameta:sbt-scalafmt_2.12:2.4.0
plugin version. Original code, on which scalafmt fails, is valid and compiles. With 2.5.3 it works fineThe text was updated successfully, but these errors were encountered: