diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 5a8ebc37..6aa5e1bf 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -23,4 +23,4 @@ jobs: - name: Check project is formatted uses: jrouly/scalafmt-native-action@v1 with: - version: '2.7.5' + version: '3.0.3' diff --git a/.scalafmt.conf b/.scalafmt.conf index ea1b299a..56051f3a 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,5 +1,5 @@ -version=2.7.5 -docstrings=JavaDoc +version=3.0.3 +docstrings.style=asterisk maxColumn=100 align.preset=none project.git=true diff --git a/core/js/src/main/scala/com/monovore/decline/PlatformApp.scala b/core/js/src/main/scala/com/monovore/decline/PlatformApp.scala index 431863d0..2ffa8ade 100644 --- a/core/js/src/main/scala/com/monovore/decline/PlatformApp.scala +++ b/core/js/src/main/scala/com/monovore/decline/PlatformApp.scala @@ -16,6 +16,9 @@ object PlatformApp { def argv: js.Array[String] = js.native } - /** Returns `Some(argument list)` when compiled with Scala.js and running under Node.js, and `None` otherwise. */ + /** + * Returns `Some(argument list)` when compiled with Scala.js and running under Node.js, and `None` + * otherwise. + */ def ambientArgs: Option[Seq[String]] = Process.process.toOption.map { _.argv.drop(2).toSeq } } diff --git a/core/jvm/src/main/scala/com/monovore/decline/PlatformApp.scala b/core/jvm/src/main/scala/com/monovore/decline/PlatformApp.scala index 8e2c7103..fbccb460 100644 --- a/core/jvm/src/main/scala/com/monovore/decline/PlatformApp.scala +++ b/core/jvm/src/main/scala/com/monovore/decline/PlatformApp.scala @@ -2,6 +2,9 @@ package com.monovore.decline object PlatformApp { - /** Returns `Some(argument list)` when compiled with Scala.js and running under Node.js, and `None` otherwise. */ + /** + * Returns `Some(argument list)` when compiled with Scala.js and running under Node.js, and `None` + * otherwise. + */ def ambientArgs: Option[Seq[String]] = None } diff --git a/core/native/src/main/scala/com/monovore/decline/PlatformApp.scala b/core/native/src/main/scala/com/monovore/decline/PlatformApp.scala index 8e2c7103..fbccb460 100644 --- a/core/native/src/main/scala/com/monovore/decline/PlatformApp.scala +++ b/core/native/src/main/scala/com/monovore/decline/PlatformApp.scala @@ -2,6 +2,9 @@ package com.monovore.decline object PlatformApp { - /** Returns `Some(argument list)` when compiled with Scala.js and running under Node.js, and `None` otherwise. */ + /** + * Returns `Some(argument list)` when compiled with Scala.js and running under Node.js, and `None` + * otherwise. + */ def ambientArgs: Option[Seq[String]] = None } diff --git a/core/shared/src/main/scala/com/monovore/decline/Argument.scala b/core/shared/src/main/scala/com/monovore/decline/Argument.scala index 7c64e785..53e63ae3 100644 --- a/core/shared/src/main/scala/com/monovore/decline/Argument.scala +++ b/core/shared/src/main/scala/com/monovore/decline/Argument.scala @@ -20,8 +20,8 @@ import scala.concurrent.duration.{Duration, FiniteDuration} trait Argument[A] { self => /** - * Attempt to parse a single command-line argument: given an argument, this returns either - * the parsed value or a message explaining the failure. + * Attempt to parse a single command-line argument: given an argument, this returns either the + * parsed value or a message explaining the failure. */ def read(string: String): ValidatedNel[String, A] diff --git a/core/shared/src/main/scala/com/monovore/decline/opts.scala b/core/shared/src/main/scala/com/monovore/decline/opts.scala index 3550b62c..83745a7c 100644 --- a/core/shared/src/main/scala/com/monovore/decline/opts.scala +++ b/core/shared/src/main/scala/com/monovore/decline/opts.scala @@ -4,8 +4,8 @@ import cats.{Alternative, Monoid} import cats.data.{NonEmptyList, Validated, ValidatedNel} /** - * A top-level argument parser, with all the info necessary to parse a full - * set of arguments or display a useful help text. + * A top-level argument parser, with all the info necessary to parse a full set of arguments or + * display a useful help text. */ class Command[+A] private[decline] ( val name: String,