Skip to content

Commit 9e4a497

Browse files
committed
Remove trailing whitespaces
I run 'git diff master --stat --name-only | xargs -I {} sed -i 's/[[:space:]]*$//g' {}' with some manual tweaks
1 parent 6c8dc60 commit 9e4a497

File tree

10 files changed

+27
-27
lines changed

10 files changed

+27
-27
lines changed

scala3doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ CLI command for running our tool is in form: `sbt main -n <name> -o <output> -t
4747
- `<classpath>`: classpath that was used to generate tasty files
4848
- `<sources>`: links to source files of module that are used to link symbols on pages to their source file. They need to be supplied in form:
4949
`local_dir=remote_dir#line_suffix` e.g. `src/main/scala=https://github.com/lampepfl/scala3doc/tree/master/src/main/scala#L`
50-
- `<documentation>`: directory of static documentation that you would like to render with API documentation. This feature is provided by dokka-site plugin:
50+
- `<documentation>`: directory of static documentation that you would like to render with API documentation. This feature is provided by dokka-site plugin:
5151
- [GitHub](https://github.com/VirtusLab/dokka-site)
5252
- [Documentation](https://virtuslab.github.io/dokka-site/index.html)
5353

scala3doc/resources/dotty_res/scripts/diagram.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $("#inheritance-diagram").ready(function() {
1616
var g = graphlibDot.read(dotNode.text);
1717
g.graph().rankDir = 'BT';
1818
g.nodes().forEach(function (v) {
19-
g.setNode(v, {
19+
g.setNode(v, {
2020
labelType: "html",
2121
label: g.node(v).label,
2222
style: g.node(v).style

scala3doc/src/dotty/dokka/model/api/internalExtensions.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private [model] case class MemberExtension(
3030
modifiers: Seq[dotty.dokka.model.api.Modifier],
3131
kind: Kind,
3232
val annotations: List[Annotation],
33-
signature: Signature,
33+
signature: Signature,
3434
origin: Origin = Origin.DefinedWithin,
3535
graph: HierarchyGraph = HierarchyGraph.empty,
3636
) extends ExtraProperty[Documentable]:
@@ -94,8 +94,8 @@ extension (member: Member):
9494
val oldExt = MemberExtension.getFrom(member).getOrElse(MemberExtension.empty)
9595
val newExt = oldExt.copy(graph = oldExt.graph ++ edges)
9696
putInMember(newExt)
97-
98-
def updateRecusivly(op: Member => Member) = op(member).withMembers(member.allMembers.map(op))
97+
98+
def updateRecusivly(op: Member => Member) = op(member).withMembers(member.allMembers.map(op))
9999

100100
extension (bound: Bound):
101101
def asSignature: Signature = bound match

scala3doc/src/dotty/dokka/model/scalaModel.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ object ScalaTagWrapper {
5959
case class ImplicitConversion(conversion: Documentable, from: DRI, to: DRI)
6060

6161
case class HierarchyGraphContentNode(
62-
val diagram: HierarchyGraph,
63-
val dci: DCI,
64-
val sourceSets: Set[DisplaySourceSet],
62+
val diagram: HierarchyGraph,
63+
val dci: DCI,
64+
val sourceSets: Set[DisplaySourceSet],
6565
val style: Set[Style],
6666
val extra: PropertyContainer[ContentNode] = PropertyContainer.Companion.empty
6767
) extends ContentNode:

scala3doc/src/dotty/dokka/tasty/ClassLikeSupport.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ trait ClassLikeSupport:
3333
name: String = classDef.name,
3434
signatureOnly: Boolean = false,
3535
modifiers: Seq[Modifier] = classDef.symbol.getExtraModifiers(),
36-
): DClass =
36+
): DClass =
3737

3838
// This Try is here because of problem that code compiles, but at runtime fails claiming
3939
// java.lang.ClassCastException: class dotty.tools.dotc.ast.Trees$DefDef cannot be cast to class dotty.tools.dotc.ast.Trees$TypeDef (dotty.tools.dotc.ast.Trees$DefDef and dotty.tools.dotc.ast.Trees$TypeDef are in unnamed module of loader 'app')
@@ -47,7 +47,7 @@ trait ClassLikeSupport:
4747
val symbol = if tree.symbol.isClassConstructor then tree.symbol.owner else tree.symbol
4848
val superLink = LinkToType(tree.dokkaType.asSignature, symbol.dri, kindForClasslike(symbol))
4949
Seq(link -> superLink) ++ getSupertypesGraph(tree.asInstanceOf[ClassDef], superLink)
50-
}
50+
}
5151
)
5252

5353
val supertypes = getSupertypes(classDef).map {
@@ -60,9 +60,9 @@ trait ClassLikeSupport:
6060
.plus(ClasslikeExtension(classDef.getConstructorMethod, classDef.getCompanion))
6161
.plus(MemberExtension(
6262
classDef.symbol.getVisibility(),
63-
modifiers,
64-
kindForClasslike( classDef.symbol),
65-
classDef.symbol.getAnnotations(),
63+
modifiers,
64+
kindForClasslike( classDef.symbol),
65+
classDef.symbol.getAnnotations(),
6666
selfSiangture,
6767
graph = graph
6868
))

scala3doc/src/dotty/dokka/transformers/ImplicitMembersExtensionTransformer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ class ImplicitMembersExtensionTransformer(ctx: DokkaContext) extends Documentabl
2525
val parentCompanions = allParents.flatMap {
2626
case cls: DClasslike => ClasslikeExtension.getFrom(cls).flatMap(_.companion).map(classlikeMap)
2727
case _ => None
28-
}
28+
}
2929

3030
// TODO (#220): We can expand this on generic etc
31-
val implictSources = outerMembers ++ companion.toSeq ++ parentCompanions
31+
val implictSources = outerMembers ++ companion.toSeq ++ parentCompanions
3232

3333
val applicableDRIs = c.parents.map(_.dri).toSet + c.dri
3434

scala3doc/src/dotty/dokka/transformers/InheritanceInformationTransformer.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import dotty.dokka.model.api._
1414
class InheritanceInformationTransformer(val ctx: DokkaContext) extends DocumentableTransformer:
1515
override def invoke(original: DModule, context: DokkaContext): DModule =
1616
val subtypes = getSupertypes(original).groupBy(_._1).transform((k, v) => v.map(_._2))
17-
original.updateMembers { m =>
17+
original.updateMembers { m =>
1818
val st: Seq[LinkToType] = subtypes.getOrElse(m.dri, Nil)
1919
m.withKnownChildren(st).withNewGraphEdges(st.map(_ -> m.asLink))
2020
}
2121

22-
private def getSupertypes(d: Documentable): Seq[(DRI, LinkToType)] = d match
22+
private def getSupertypes(d: Documentable): Seq[(DRI, LinkToType)] = d match
2323
case m: DModule => m.getPackages.asScala.toList.flatMap(p => getSupertypes(p))
24-
case c: Member =>
25-
val selfMapping = if !c.kind.isInstanceOf[Classlike] then Nil else c.parents.map(_._2 -> c.asLink)
24+
case c: Member =>
25+
val selfMapping = if !c.kind.isInstanceOf[Classlike] then Nil else c.parents.map(_._2 -> c.asLink)
2626
c.allMembers.flatMap(getSupertypes) ++ selfMapping

scala3doc/src/dotty/dokka/translators/ScalaPageCreator.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,14 +429,14 @@ class ScalaPageCreator(
429429
_.list(subtypes.toList, separator="")(contentForTypeLink)
430430
}
431431
}
432-
432+
433433
graph.fold(withSubtypes) { graph =>
434434
if graph.edges.isEmpty then withSubtypes else
435435
withSubtypes.header(2, "Type hierarchy")().group(
436436
kind = ContentKind.Comment,
437-
styles = Set(ContentStyle.WithExtraAttributes),
437+
styles = Set(ContentStyle.WithExtraAttributes),
438438
extra = PropertyContainer.Companion.empty plus SimpleAttr.Companion.header("Type hierarchy")
439-
) { _.group(kind = ContentKind.Symbol, styles = Set(TextStyle.Monospace)) {
439+
) { _.group(kind = ContentKind.Symbol, styles = Set(TextStyle.Monospace)) {
440440
_.dotDiagram(graph)
441441
}
442442
}

scala3doc/src/dotty/renderers/DotDiagramBuilder.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import HTML._
1010
import dotty.dokka.model.api._
1111

1212
object DotDiagramBuilder:
13-
def build(diagram: HierarchyGraph, renderer: SignatureRenderer): String =
13+
def build(diagram: HierarchyGraph, renderer: SignatureRenderer): String =
1414
val vWithId = diagram.verteciesWithId
1515
val vertecies = vWithId.map { (vertex, id) =>
1616
s"""node${id} [label="${getHtmlLabel(vertex, renderer)}", style="${getStyle(vertex)}"];\n"""
@@ -28,7 +28,7 @@ object DotDiagramBuilder:
2828
|""".stripMargin
2929

3030

31-
private def getStyle(vertex: LinkToType) = vertex.kind match
31+
private def getStyle(vertex: LinkToType) = vertex.kind match
3232
case Kind.Class => "fill: #45AD7D;"
3333
case Kind.Object => "fill: #285577;"
3434
case Kind.Trait => "fill: #1CAACF;"

scala3doc/src/dotty/renderers/ScalaHtmlRenderer.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class SignatureRenderer(pageContext: ContentPage, sourceSetRestriciton: JSet[Dis
2626
link(dri) match
2727
case Some(link) => a(href := link, modifiers)(name)
2828
case _ => span(Attr("data-unresolved-link") := dri.toString, modifiers)(name)
29-
29+
3030
def renderElementWith(e: String | (String, DRI) | Link, modifiers: AppliedAttr*) = e match
3131
case (name, dri) => renderLink(name, dri, modifiers:_*)
3232
case name: String => raw(name)
@@ -63,7 +63,7 @@ class ScalaHtmlRenderer(ctx: DokkaContext) extends SiteRenderer(ctx) {
6363
node match {
6464
case n: HtmlContentNode => withHtml(f, raw(n.body).toString)
6565
case n: HierarchyGraphContentNode => buildDiagram(f, n.diagram, pageContext)
66-
case n: DocumentableList =>
66+
case n: DocumentableList =>
6767
val ss = if sourceSetRestriciton == null then Set.empty.asJava else sourceSetRestriciton
6868
withHtml(f, buildDocumentableList(n, pageContext, ss).toString())
6969
case n: DocumentableFilter => withHtml(f, buildDocumentableFilter.toString)
@@ -202,7 +202,7 @@ class ScalaHtmlRenderer(ctx: DokkaContext) extends SiteRenderer(ctx) {
202202
})
203203
}
204204

205-
def buildDiagram(f: FlowContent, diagram: HierarchyGraph, pageContext: ContentPage) =
205+
def buildDiagram(f: FlowContent, diagram: HierarchyGraph, pageContext: ContentPage) =
206206
val renderer = SignatureRenderer(pageContext, sourceSets, getLocationProvider)
207207
withHtml(f, div( id := "inheritance-diagram", cls := "diagram-class")(
208208
svg(id := "graph"),

0 commit comments

Comments
 (0)