diff --git a/.scalafmt.conf b/.scalafmt.conf index 42efc236a..dee978305 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version=2.7.2 +version=2.7.5 maxColumn = 100 project.git = true align.preset = none diff --git a/mdoc-lsp/src/main/scala/mdoc/internal/lsp/LspLogger.scala b/mdoc-lsp/src/main/scala/mdoc/internal/lsp/LspLogger.scala index 1abbdb97a..19ede06f6 100644 --- a/mdoc-lsp/src/main/scala/mdoc/internal/lsp/LspLogger.scala +++ b/mdoc-lsp/src/main/scala/mdoc/internal/lsp/LspLogger.scala @@ -8,8 +8,7 @@ import scribe.Logger import scribe.format._ import scribe.writer.Writer -/** - * Scribe logging handler that forwards logging messages to the LSP editor client. +/** Scribe logging handler that forwards logging messages to the LSP editor client. */ object LspLogger extends Writer { def update(client: MdocLanguageClient): Unit = { diff --git a/mdoc/src/main/scala-2/mdoc/Variable.scala b/mdoc/src/main/scala-2/mdoc/Variable.scala index 34efe2c64..dd48187ed 100644 --- a/mdoc/src/main/scala-2/mdoc/Variable.scala +++ b/mdoc/src/main/scala-2/mdoc/Variable.scala @@ -4,8 +4,7 @@ import mdoc.internal.markdown.Modifier import mdoc.internal.markdown.ReplVariablePrinter import scala.meta.inputs.Position -/** - * A captured variable in a code fence. +/** A captured variable in a code fence. * * Example, the code fence below has two statements: * diff --git a/mdoc/src/main/scala-2/mdoc/internal/livereload/LiveReload.scala b/mdoc/src/main/scala-2/mdoc/internal/livereload/LiveReload.scala index b9612c63b..2618b9c24 100644 --- a/mdoc/src/main/scala-2/mdoc/internal/livereload/LiveReload.scala +++ b/mdoc/src/main/scala-2/mdoc/internal/livereload/LiveReload.scala @@ -2,8 +2,7 @@ package mdoc.internal.livereload import java.nio.file.Path -/** - * Interface of a LiveReload server http://livereload.com/api/protocol/ +/** Interface of a LiveReload server http://livereload.com/api/protocol/ */ trait LiveReload { diff --git a/mdoc/src/main/scala-2/mdoc/internal/livereload/UndertowLiveReload.scala b/mdoc/src/main/scala-2/mdoc/internal/livereload/UndertowLiveReload.scala index d6665f74d..2c6ab90fc 100644 --- a/mdoc/src/main/scala-2/mdoc/internal/livereload/UndertowLiveReload.scala +++ b/mdoc/src/main/scala-2/mdoc/internal/livereload/UndertowLiveReload.scala @@ -54,8 +54,7 @@ final case class UndertowLiveReload private ( object UndertowLiveReload { - /** - * Instantiate an undertow file server that speaks the LiveReload protocol. + /** Instantiate an undertow file server that speaks the LiveReload protocol. * * See LiveReload protocol for more details: http://livereload.com/api/protocol/ * diff --git a/mdoc/src/main/scala-2/mdoc/internal/markdown/Markdown.scala b/mdoc/src/main/scala-2/mdoc/internal/markdown/Markdown.scala index fe66e4a4c..3047f82fc 100644 --- a/mdoc/src/main/scala-2/mdoc/internal/markdown/Markdown.scala +++ b/mdoc/src/main/scala-2/mdoc/internal/markdown/Markdown.scala @@ -31,8 +31,7 @@ object Markdown { val RelativePathKey = new DataKey[Option[RelativePath]]("mdocFile", None) val SiteVariables = new DataKey[Option[Map[String, String]]]("siteVariables", None) - /** - * Defines the default markdown settings. + /** Defines the default markdown settings. * * Do not use directly. The default flexmark settings have special keys set * up by mdoc to keep track of certain document-specific information like path. diff --git a/mdoc/src/main/scala-2/mdoc/internal/markdown/MdocExtensions.scala b/mdoc/src/main/scala-2/mdoc/internal/markdown/MdocExtensions.scala index e65ac115e..0ad665e9e 100644 --- a/mdoc/src/main/scala-2/mdoc/internal/markdown/MdocExtensions.scala +++ b/mdoc/src/main/scala-2/mdoc/internal/markdown/MdocExtensions.scala @@ -15,8 +15,7 @@ import mdoc.internal.cli.Context object MdocExtensions { - /** - * Defines mdoc's markdown extensions. + /** Defines mdoc's markdown extensions. * * Inspired by CommonMark formatter options so that pandoc understands it. * https://github.com/vsch/flexmark-java/blob/master/flexmark-java-samples/src/com/vladsch/flexmark/samples/FormatConverterCommonMark.java#L27-L37 diff --git a/mdoc/src/main/scala-2/mdoc/internal/markdown/Modifier.scala b/mdoc/src/main/scala-2/mdoc/internal/markdown/Modifier.scala index d98d1bb64..80f5f1cf2 100644 --- a/mdoc/src/main/scala-2/mdoc/internal/markdown/Modifier.scala +++ b/mdoc/src/main/scala-2/mdoc/internal/markdown/Modifier.scala @@ -3,8 +3,7 @@ package mdoc.internal.markdown import mdoc.StringModifier import mdoc.internal.markdown.Mod._ -/** - * A mdoc code fence modifier. +/** A mdoc code fence modifier. * * Modifiers are parsed from code blocks like here * diff --git a/mdoc/src/main/scala/mdoc/internal/CompatClassloader.scala b/mdoc/src/main/scala/mdoc/internal/CompatClassloader.scala index 14a09672f..8cc42ce69 100644 --- a/mdoc/src/main/scala/mdoc/internal/CompatClassloader.scala +++ b/mdoc/src/main/scala/mdoc/internal/CompatClassloader.scala @@ -7,8 +7,7 @@ import scala.collection.JavaConverters._ object CompatClassloader { - /** - * Utility to get SystemClassLoader/ClassLoader urls in java8 and java9+ + /** Utility to get SystemClassLoader/ClassLoader urls in java8 and java9+ * Based upon: https://gist.github.com/hengyunabc/644f8e84908b7b405c532a51d8e34ba9 */ def getURLs(classLoader: ClassLoader): Seq[URL] = { diff --git a/mdoc/src/main/scala/mdoc/internal/cli/InputFile.scala b/mdoc/src/main/scala/mdoc/internal/cli/InputFile.scala index fbd317e6f..b21577c21 100644 --- a/mdoc/src/main/scala/mdoc/internal/cli/InputFile.scala +++ b/mdoc/src/main/scala/mdoc/internal/cli/InputFile.scala @@ -7,8 +7,7 @@ import metaconfig.Input import java.nio.file.Files import mdoc.internal.pos.PositionSyntax._ -/** - * @param relpath the input filename relativized by its input directory. +/** @param relpath the input filename relativized by its input directory. * @param inputFile the input file to read from. * @param outputFile the output file to write to. * @param inputDirectory directory enclosing the input file. diff --git a/mdoc/src/main/scala/mdoc/internal/markdown/SharedRepositoryParser.scala b/mdoc/src/main/scala/mdoc/internal/markdown/SharedRepositoryParser.scala index ba84c67b4..48172ce63 100644 --- a/mdoc/src/main/scala/mdoc/internal/markdown/SharedRepositoryParser.scala +++ b/mdoc/src/main/scala/mdoc/internal/markdown/SharedRepositoryParser.scala @@ -1,5 +1,4 @@ -/** - * This file is derived from the following Coursier sources, see NOTICE for license details. +/** This file is derived from the following Coursier sources, see NOTICE for license details. * https://github.com/coursier/coursier/blob/dfb04cab48a4beefa2be59fc71e3eff0493a5886/modules/coursier/shared/src/main/scala/coursier/Repositories.scala * https://github.com/coursier/coursier/blob/dfb04cab48a4beefa2be59fc71e3eff0493a5886/modules/coursier/shared/src/main/scala/coursier/internal/SharedRepositoryParser.scala */ diff --git a/mdoc/src/main/scala/mdoc/internal/pos/BinarySearch.scala b/mdoc/src/main/scala/mdoc/internal/pos/BinarySearch.scala index 89a5e5605..4243af90e 100644 --- a/mdoc/src/main/scala/mdoc/internal/pos/BinarySearch.scala +++ b/mdoc/src/main/scala/mdoc/internal/pos/BinarySearch.scala @@ -8,8 +8,7 @@ object BinarySearch { case object Equal extends ComparisonResult case object Smaller extends ComparisonResult - /** - * Binary search using a custom compare function. + /** Binary search using a custom compare function. * * scala.util.Searching does not support the ability to search an IndexedSeq * by a custom mapping function, you must search by an element of the same diff --git a/mdoc/src/main/scala/mdoc/internal/pos/TokenEditDistance.scala b/mdoc/src/main/scala/mdoc/internal/pos/TokenEditDistance.scala index b9af045e3..83876221e 100644 --- a/mdoc/src/main/scala/mdoc/internal/pos/TokenEditDistance.scala +++ b/mdoc/src/main/scala/mdoc/internal/pos/TokenEditDistance.scala @@ -79,8 +79,7 @@ object TokenEditDistance { lazy val empty: TokenEditDistance = new TokenEditDistance(Array.empty) - /** - * Build utility to map offsets between two slightly different strings. + /** Build utility to map offsets between two slightly different strings. * * @param original The original snapshot of a string, for example the latest * semanticdb snapshot. diff --git a/runtime/src/main/scala/mdoc/document/CompileResult.scala b/runtime/src/main/scala/mdoc/document/CompileResult.scala index 174a6d496..d0b6a8fbb 100644 --- a/runtime/src/main/scala/mdoc/document/CompileResult.scala +++ b/runtime/src/main/scala/mdoc/document/CompileResult.scala @@ -8,15 +8,13 @@ object CompileResult { sealed trait CompileError extends CompileResult - /** - * Compiler reported an error message during typechecking. + /** Compiler reported an error message during typechecking. * @param message the typechecking error message (without position formatting) * @param pos the range position inside the code fence */ final case class TypeError(message: String, pos: RangePosition) extends CompileError - /** - * Compiler reported an error message during parsing. + /** Compiler reported an error message during parsing. * @param message the syntax error message (without position formatting) * @param pos the range position inside the code fence */