-
Notifications
You must be signed in to change notification settings - Fork 26
/
.scalafmt.conf
99 lines (91 loc) · 2.05 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version = "3.7.17"
maxColumn = 120
encoding = "UTF-8"
runner.dialect = scala213
docstrings {
style = Asterisk
forceBlankLineBefore = false
wrap = false
}
indent {
main = 4
callSite = 4
}
indentOperator.exemptScope = aloneEnclosed
project.excludePaths = [
"glob:**/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/fpcf/analyses/InterProceduralEscapeAnalysisDemo.scala",
"glob:**/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/fpcf/analyses/SimpleEscapeAnalysisDemo.scala"
]
newlines {
source = keep
afterCurlyLambdaParams = squash
avoidForSimpleOverflow = [slc, tooLong, punct] # singe line comment, does not add newline if line would be too long after, punctuation
topLevelStatementBlankLines = [{ blanks { before = 1 }, maxNest = 0 }]
sometimesBeforeColonInMethodReturnType = false
ignoreInSyntax = false
}
binPack.parentConstructors = keep
literals {
long = Upper
float = Lower
double = Lower
hexPrefix = Lower
hexDigits = Upper
scientific = Lower
}
xmlLiterals.assumeFormatted = true
rewrite {
rules = [
SortModifiers,
Imports
]
sortModifiers.order = [
"sealed", "abstract", "override",
"private", "protected",
"implicit", "final", "lazy"
]
imports {
expand = true
sort = scalastyle
groups = [
["scala\\.language\\..*",
"scala\\.annotation\\..*",
"scala\\.reflect\\..*"],
["javax?\\..*",
"scala\\..*",
"play\\..*"],
["org\\.junit\\..*",
"org\\.scalacheck\\..*",
"org\\.scalatest\\..*",
"org\\.scalatestplus\\..*"],
["com\\.typesafe\\.config\\..*"],
["org\\.opalj\\..*"],
["scala\\.collection\\.parallel\\.CollectionConverters\\..*"]
// Catch all
]
}
}
align {
preset = none
allowOverflow = true
openParenCtrlSite = true
multiline = false
inInterpolation = false
tokens = [{
code = ":"
owners = [{
regex = "Term\\.Param"
}]
}, {
code = "="
owners = [{
regex = "Term\\.Param"
}]
}, {
code = "=>"
owners = [{
regex = "Case"
}]
}
]
}