Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sbt/sbt-sdlc
Scaladoc link checker for sbt
https://github.com/sbt/sbt-sdlc
sbt sbt-plugin scala
Last synced: 3 months ago
JSON representation
Scaladoc link checker for sbt
- Host: GitHub
- URL: https://github.com/sbt/sbt-sdlc
- Owner: sbt
- License: other
- Created: 2014-01-16T18:16:21.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2023-12-04T01:46:03.000Z (about 1 year ago)
- Last Synced: 2024-04-29T22:23:22.802Z (9 months ago)
- Topics: sbt, sbt-plugin, scala
- Language: Scala
- Homepage:
- Size: 38.1 KB
- Stars: 11
- Watchers: 7
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Scaladoc link checker plugin for sbt
====================================sdlc checks links in HTML files against a scaladoc site. Unlike a regular link checker it understands scaladoc's
fragment syntax. sdlc only needs HTML files as input and validates all links with a specified prefix, so it should
work with any documentation tool that can output HTML (like Ornate or Paradox).Add to `project/plugins.sbt`:
```scala
addSbtPlugin("com.github.sbt" % "sbt-sdlc" % "0.3.0")
```Add add something like this to `build.sbt`:
```scala
lazy val root = project.in(file("."))
.enablePlugins(SDLCPlugin)sdlcBase := s"http://slick.typesafe.com/doc/${version.value}/api/"
sdlcCheckDir := (target in com.typesafe.sbt.SbtSite.SiteKeys.makeSite).value
sdlc := (sdlc dependsOn (doc in Compile)).value
```Type `sdlc` to run in sbt.
The following setting keys are available:
```scala
val sdlcDocDir = settingKey[File]("The directory containing scaladoc output")
val sdlcBase = settingKey[String]("The base URI of the scaladoc output")
val sdlcCheckDir = settingKey[File]("The directory containing HTML files to check")
val sdlcVersion = settingKey[String]("The scaladoc format version (2.11/2.12/auto)")
```By default the `sdlc` task does not depend on `doc` so it won't (re)build the scaladocs automatically. You have to add
the dependency yourself (see above) if you want this behavior. `sdlcDocDir` is set to the scaladoc target directory.
`sdlcVersion` is set to `auto` in order to auto-detect scaladoc 2.11 (or lower) and 2.12 (or higher) which use different
link formats. In most cases you only need to set `sdlcBase` and `sdlcCheckDir`.