Skip to content

Commit 8ad4a17

Browse files
authored
Update scalafmt (#221)
1 parent 476122f commit 8ad4a17

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
- name: Check project is formatted
2424
uses: jrouly/scalafmt-native-action@v1
2525
with:
26-
version: '3.4.3'
26+
version: '3.5.1'

.scalafmt.conf

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
version = 3.4.3
2-
1+
version = 3.5.1
32
runner.dialect = scala213
4-
docstrings.style = Asterisk
53
maxColumn = 120
4+
docstrings.style = Asterisk
65
assumeStandardLibraryStripMargin = true
76
rewrite.rules = [RedundantBraces, RedundantParens, SortImports, SortModifiers]
87
indentOperator.exemptScope = all
9-
align.tokens = [
8+
align.tokens."+" = [
109
{code = "%", owner = "Term.ApplyInfix"},
1110
{code = "%%", owner = "Term.ApplyInfix"},
1211
{code = ":=", owner = "Term.ApplyInfix"},
12+
{
13+
code = "=>"
14+
owners = [{
15+
regex = "Case"
16+
}]
17+
},
1318
"="
1419
]

src/main/scala/com/lightbend/paradox/apidoc/ApidocDirective.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ class ApidocDirective(scanner: ScanResult, allClassesAndObjects: IndexedSeq[Stri
102102
private def splitGenerics(label: String): (String, String) =
103103
label.indexOf('[') match {
104104
case -1 => (label, "")
105-
case n => label.replaceAll("\\\\_", "_").splitAt(n)
105+
case n => label.replaceAll("\\\\_", "_").splitAt(n)
106106
}
107107
}
108108

109109
def render(node: DirectiveNode, visitor: Visitor, printer: Printer): Unit = {
110110
val query = node.source match {
111111
case Source.Empty | _: Source.Ref => Query(node.label)
112-
case s: Source.Direct => Query(node.label, s.value)
112+
case s: Source.Direct => Query(node.label, s.value)
113113
}
114114
if (query.pattern.contains('.')) {
115115
val classNameWithDollarForInnerClasses = query.pattern.replaceAll("(\\b[A-Z].+)\\.", "$1\\$")

0 commit comments

Comments
 (0)