agile-lab-dev/darwin

Add .scalafmt.conf

Closed this issue · 1 comments

In order to minimise the diff between different branches and to have a more uniform code style I suggest to add a Scalafmt configuration file to the project.

version = "2.5.0-RC1"
project.git = true
encoding = "UTF-8"
maxColumn = 120
align = most
continuationIndent.defnSite = 2
assumeStandardLibraryStripMargin = true
docstrings = JavaDoc
lineEndings = unix
includeCurlyBraceInSelectChains = false
danglingParentheses = true
spaces {
  inImportCurlyBraces = true
}
optIn.annotationNewlines = true

rewrite.rules = [SortImports, RedundantBraces]

rewrite.redundantBraces is lovely but removes braces from if else expressions which I don't like. I will try submitting a PR to scalafmt to make it opt-in. In the meantime I'll put this issue on hold