forked from scala-native/scala-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.scalafmt.conf
More file actions
91 lines (81 loc) · 2.07 KB
/
.scalafmt.conf
File metadata and controls
91 lines (81 loc) · 2.07 KB
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
# Overall we are trying to use default settings to the
# maximum extent possible. Removing non-default
# settings is preferred over adding especially as
# the Scala language evolves and styles change.
# Test upgrades: $ scripts/scalafmt --test 2> diff.txt
version = 3.10.4
assumeStandardLibraryStripMargin = true
binPack {
importSelectors = fold
}
danglingParentheses {
ctrlSite = false
}
docstrings {
style = AsteriskSpace
}
fileOverride {
# default is 2.12, see under runner
"glob:**/scripts/*" = scala3
"glob:**/src/**/require-scala3*/**" = scala3
"lang:scala-next" = scala3future
}
indent {
# Keep control sites more streamlined
ctrlSite = 4
# Default is not recommended
infix.exemptScope = aloneEnclosed
}
newlines {
# This creates less of a diff but is not default
# but is more aligned with Scala.js syntax.
beforeCurlyLambdaParams = multilineWithCaseOnly
afterCurlyLambdaParams = keep
ignoreInSyntax = false
}
project {
git = true
excludePaths = [
"glob:**/scalalib/overrides-*/**"
# Files to big to disable formating using directive // format: off
"glob:**/nativelib/**/unsafe/Tag.scala"
]
layout = StandardConvention
}
rewrite {
rules = [
Imports
SortModifiers
]
imports {
selectors = fold
removeRedundantSelectors = true
// with sorting and grouping, be extra careful about relative imports
sort = ascii
groups = [
["sbt\\..*"]
["java.?\\..*"]
["jdk\\..*"]
["scala\\..*", "dotty\\..*"]
["org\\.junit\\..*"]
["org\\..*", "com\\..*"]
["scala\\.scalanative\\..*", "scalanative\\..*"]
["[a-z]+\\..*"] // catch-all for other top-level-like packages
]
}
tokens = {
"⇒": "=>"
"→": "->"
"←": "<-"
}
sortModifiers.preset = styleGuide
}
runner {
# Default runner.dialect is deprecated now, needs to be explicitly set
dialect = scala213source3
# Added for CI error via --test option
fatalWarnings = true
# default value is 10,000
# Message about NirGenExpr.scala goes away between 18k and 20k
optimizer.maxVisitsPerToken = 20000
}