-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.scalafmt.conf
67 lines (57 loc) · 1.24 KB
/
.scalafmt.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Documentation https://scalameta.org/scalafmt/docs/configuration.html
version = "3.1.1"
# Only format files tracked by git.
project.git = true
runner.dialect = "scala213"
maxColumn = 120
docstrings.style = Asterisk
docstrings.wrapMaxColumn = 80
indent.defnSite = 2
newlines.topLevelBodyIfMinStatements = [before,after]
newlines.topLevelStatementBlankLines = [
{
minBreaks = 0
blanks = 1
regex = "^Decl.Def|^Defn.Def"
}
]
includeCurlyBraceInSelectChains = false
align.preset = most
align.multiline = true
align.arrowEnumeratorGenerator = true
rewrite.rules = [
# a func (b, c) ---> a.func(b, c)
AvoidInfix,
# import foo.{Zilch, bar, Random, sand} ----> import foo.{bar, sand, Random, Zilch}
SortImports,
# def foo = { List(1,2,3).sum } ---> def foo = List(1,2,3).sum
RedundantBraces,
# (a + b) + c ---> a + b + c
RedundantParens,
# final lazy private implicit val x = 42 ---> implicit final private lazy val x = 42
SortModifiers,
# for (...) yield x ---> for {...} yield x
PreferCurlyFors
]
rewrite.neverInfix.excludeFilters = [
until
to
by
eq
ne
"should.*"
"contain.*"
"must.*"
"behave.*"
"like.*"
in
inIO
be
taggedAs
thrownBy
synchronized
have
when
size
theSameElementsAs
]