forked from scala-native/scala-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.scalafmt.conf
43 lines (40 loc) · 1.31 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
# 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.7.14
docstrings.style = AsteriskSpace
project.git = true
project.excludePaths = [
"glob:**/scalalib/**",
# Files to big to disable formating using directive // format: off
"glob:**/nativelib/**/unsafe/Tag.scala"
# Scalafmt does not support capture checking syntax yet.
"glob:**/src/**/scala-next/**"
]
# Default runner.dialect is deprecated now, needs to be explicitly set
runner.dialect = scala3
# Added for CI error via --test option
runner.fatalWarnings = true
# This creates less of a diff but is not default
# but is more aligned with Scala.js syntax.
newlines.beforeCurlyLambdaParams = multilineWithCaseOnly
# Keep control sites more streamlined
indent.ctrlSite = 4
danglingParentheses.ctrlSite = false
# Default is not recommended
indentOperator.exemptScope = aloneEnclosed
# default value is 10,000
# Message about NirGenExpr.scala goes away between 18k and 20k
runner.optimizer.maxVisitsPerToken = 20000
rewriteTokens = {
"⇒": "=>"
"→": "->"
"←": "<-"
}
fileOverride {
"glob:**/src/**/scala-2*/**" {
runner.dialect = scala213
}
}