forked from scalalandio/chimney
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.scalafmt.conf
47 lines (42 loc) · 1.47 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
version = 3.8.3
project.git = true
project.includePaths."+" = ["glob:**/docs/**.md"]
maxColumn = 120
runner.dialect = Scala213Source3
fileOverride {
"glob:**/src/main/scala-3/**" {
runner.dialect = scala3
runner.dialectOverride.allowSignificantIndentation = false
runner.dialectOverride.allowQuietSyntax = true
}
"glob:**/src/test/scala-3/**" {
runner.dialect = scala3
runner.dialectOverride.allowSignificantIndentation = false
runner.dialectOverride.allowQuietSyntax = true
}
"glob:**/scripts/**" {
runner.dialect = scala3
runner.dialectOverride.allowSignificantIndentation = false
runner.dialectOverride.allowQuietSyntax = true
}
// for we we have to:
// - replace ```scala with ```scala mdoc (MkDocs does NOT support these suffixes)
// - run scalafmt --check docs/docs
// - fix errors or ignore them (it doesn't handle Scala 3... while using scala3 runner messes up a lot of examples)
// - replace ```scala mdoc with ```scala again
"glob:**/docs/**.md" {
maxColumn = 120
rewrite.scala3.convertToNewSyntax = false
}
}
align.preset = some
rewrite.rules = [Imports, RedundantBraces, SortModifiers]
rewrite.imports.sort = scalastyle
rewrite.redundantBraces.stringInterpolation = true
rewrite.scala3.convertToNewSyntax = true
rewrite.scala3.removeOptionalBraces = false
docstrings.blankFirstLine = no
docstrings.style = SpaceAsterisk
docstrings.wrap = yes
newlines.sometimesBeforeColonInMethodReturnType = true
lineEndings = unix