Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalafmt #354

Merged
merged 1 commit into from
Sep 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
4 changes: 2 additions & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version=2.7.5
docstrings=JavaDoc
version=3.0.3
docstrings.style=asterisk
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asterisk is the new name for the Javadoc style, see docstring in https://scalameta.org/scalafmt/docs/configuration.html

maxColumn=100
align.preset=none
project.git=true
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
4 changes: 2 additions & 2 deletions core/shared/src/main/scala/com/monovore/decline/opts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down