diff --git a/.scalafmt.conf b/.scalafmt.conf index 2bd05ea..94d6599 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -8,4 +8,4 @@ rewrite.rules = [ AvoidInfix, ExpandImportSelectors, RedundantParens, SortModifi rewrite.sortModifiers.order = [ "private", "protected", "final", "sealed", "abstract", "implicit", "override", "lazy" ] spaces.inImportCurlyBraces = true # more idiomatic to include whitepsace in import x.{ yyy } trailingCommas = preserve -version = 2.2.2 +version = 2.3.2 diff --git a/src/main/scala/play/doc/FileRepository.scala b/src/main/scala/play/doc/FileRepository.scala index 98c7d71..175384d 100644 --- a/src/main/scala/play/doc/FileRepository.scala +++ b/src/main/scala/play/doc/FileRepository.scala @@ -21,6 +21,7 @@ case class FileHandle(name: String, size: Long, is: InputStream, close: () => Un * Repository for loading files */ trait FileRepository { + /** * Load a file using the given loader. If the file is found then the * file will be opened and loader will be called with its content. The diff --git a/src/main/scala/play/doc/PageIndex.scala b/src/main/scala/play/doc/PageIndex.scala index ef1b67c..e105fef 100644 --- a/src/main/scala/play/doc/PageIndex.scala +++ b/src/main/scala/play/doc/PageIndex.scala @@ -6,6 +6,7 @@ import org.apache.commons.io.IOUtils * A table of contents node */ sealed trait TocTree { + /** * The page that this node should point to */ diff --git a/src/main/scala/play/doc/PlayDoc.scala b/src/main/scala/play/doc/PlayDoc.scala index a688e67..263dfae 100644 --- a/src/main/scala/play/doc/PlayDoc.scala +++ b/src/main/scala/play/doc/PlayDoc.scala @@ -373,14 +373,13 @@ class PlayDoc( .map { line => if (!line.exists(_ != ' ')) None else Some(line.indexWhere(_ != ' ')) } - .reduce( - (i1, i2) => - (i1, i2) match { - case (None, None) => None - case (i, None) => i - case (None, i) => i - case (Some(i1), Some(i2)) => Some(math.min(i1, i2)) - } + .reduce((i1, i2) => + (i1, i2) match { + case (None, None) => None + case (i, None) => i + case (None, i) => i + case (Some(i1), Some(i2)) => Some(math.min(i1, i2)) + } ) .getOrElse(0) diff --git a/src/main/scala/play/doc/PlayDocTemplates.scala b/src/main/scala/play/doc/PlayDocTemplates.scala index 8968ba5..9b02a3b 100644 --- a/src/main/scala/play/doc/PlayDocTemplates.scala +++ b/src/main/scala/play/doc/PlayDocTemplates.scala @@ -4,6 +4,7 @@ package play.doc * Templates for rendering Play documentation snippets. */ trait PlayDocTemplates { + /** * Render the next link. *