Skip to content

Commit 6aed05c

Browse files
committed
Code cleanup
1 parent d7d9606 commit 6aed05c

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

scala3doc/src/dotty/dokka/DottyDokkaConfig.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ case class DottyDokkaConfig(docConfiguration: DocConfiguration) extends DokkaCon
2626
sourceLinks
2727
))
2828

29-
3029
override def getPluginsConfiguration: JList[DokkaConfiguration.PluginConfiguration] = JList()
3130

3231
lazy val mkSourceSet: DokkaSourceSet =

scala3doc/src/dotty/dokka/SourceLinks.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,6 @@ object SourceLinks:
135135
load(
136136
config.args.sourceLinks,
137137
config.args.revision,
138+
// TODO (https://github.com/lampepfl/scala3doc/issues/240): configure source root
138139
Paths.get("").toAbsolutePath
139140
)

scala3doc/src/dotty/dokka/site/LoadedTemplate.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import org.jsoup.Jsoup
1313
import scala.collection.JavaConverters._
1414

1515

16-
case class LazyEntry(val getKey: String, value: () => String) extends JMapEntry[String, Object]:
16+
case class LazyEntry(getKey: String, value: () => String) extends JMapEntry[String, Object]:
1717
lazy val getValue: Object = value()
1818
def setValue(x$0: Object): Object = ???
1919

@@ -36,6 +36,8 @@ case class LoadedTemplate(templateFile: TemplateFile, children: List[LoadedTempl
3636
val posts = children.map(_.lazyTemplateProperties(ctx))
3737
val site = templateFile.settings.getOrElse("site", Map.empty).asInstanceOf[Map[String, Object]]
3838
val sourceLinks = if !file.exists() then Nil else
39+
// TODO (https://github.com/lampepfl/scala3doc/issues/240): configure source root
40+
// toRealPath is used to turn symlinks into proper paths
3941
val actualPath = Paths.get("").toAbsolutePath.relativize(file.toPath.toRealPath())
4042
ctx.sourceLinks.pathTo(actualPath).map("viewSource" -> _ ) ++
4143
ctx.sourceLinks.pathTo(actualPath, operation = "edit").map("editSource" -> _ )

scala3doc/test/dotty/dokka/SourceLinksTests.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class SourceLinkTest:
5656
}
5757

5858
class SourceLinksTest:
59+
// TODO (https://github.com/lampepfl/scala3doc/issues/240): configure source root
5960
val projectRoot = Paths.get("").toAbsolutePath()
6061

6162
val edit: Operation = "edit" // union types need explicit singletons

0 commit comments

Comments
 (0)