forked from dvreeze/tqa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.scalafmt.conf
22 lines (15 loc) · 1.07 KB
/
.scalafmt.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Scalafmt configuration chosen in such a way that you could easily predict the
# formatting result and do it right yourself (without any formatting tooling).
# I am convinced that this predictability also causes readability to improve.
# This configuration is also chosen for its defensive alignment strategy, in order
# to minimize differences in indenting when adapting code.
# Question: how to style (multiline) monadic chains of expressions (using map/flatMap/filter etc.)?
# If the lambdas themselves are oneliners, do we start or end the lines with a dot?
# If the lambdas are multiline expressions (bounded by braces), do we use dots or not?
# In other words, do we then treat the HOFs (map/flatMap/filter etc.) as infix operators or not?
# See also https://github.com/databricks/scala-style-guide for inspiration.
maxColumn = 120
align.openParenCallSite = false # Do not align function calls by '('
align.openParenDefnSite = false # Do not align function definitions by '('
docstrings = JavaDoc
rewrite.rules = [AvoidInfix, ExpandImportSelectors, RedundantParens, PreferCurlyFors]