mirror of https://github.com/sbt/sbt.git
address more warnings
This commit is contained in:
parent
4b23036c63
commit
ef49a95b7d
|
|
@ -193,7 +193,6 @@ val completeProj = (project in file("internal") / "util-complete")
|
|||
testedBaseSettings,
|
||||
name := "Completion",
|
||||
libraryDependencies += jline,
|
||||
Compile / scalacOptions += "-Ywarn-unused:-explicits",
|
||||
mimaSettings,
|
||||
// Parser is used publicly, so we can't break bincompat.
|
||||
mimaBinaryIssueFilters := Seq(
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ object Instance {
|
|||
*
|
||||
* Each `input` in each expression of the form `wrap[T]( input )` is transformed by `convert`.
|
||||
* This transformation converts the input Tree to a Tree of type `M[T]`.
|
||||
* The original wrapped expression `wrap(input)` is replaced by a reference to a new local `val $x: T`, where `$x` is a fresh name.
|
||||
* The original wrapped expression `wrap(input)` is replaced by a reference to a new local `val x: T`, where `x` is a fresh name.
|
||||
* These converted inputs are passed to `builder` as well as the list of these synthetic `ValDef`s.
|
||||
* The `TupleBuilder` instance constructs a tuple (Tree) from the inputs and defines the right hand side of the vals
|
||||
* that unpacks the tuple containing the results of the inputs.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import sbt.io.IO
|
|||
|
||||
/**
|
||||
* These sources of examples are used in parsers for user input completion. An example of such a source is the
|
||||
* [[sbt.complete.FileExamples]] class, which provides a list of suggested files to the user as they press the
|
||||
* [[sbt.internal.util.complete.FileExamples]] class, which provides a list of suggested files to the user as they press the
|
||||
* TAB key in the console.
|
||||
*/
|
||||
trait ExampleSource {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ final case class Clauses(clauses: List[Clause]) {
|
|||
/** When the `body` Formula succeeds, atoms in `head` are true. */
|
||||
final case class Clause(body: Formula, head: Set[Atom])
|
||||
|
||||
/** A literal is an [[Atom]] or its [[negation|Negated]]. */
|
||||
/** A literal is an [[Atom]] or its negation ([[Negated]]). */
|
||||
sealed abstract class Literal extends Formula {
|
||||
|
||||
/** The underlying (positive) atom. */
|
||||
|
|
|
|||
|
|
@ -280,13 +280,13 @@ object Scoped {
|
|||
final def set(app: Initialize[S], source: SourcePosition): Setting[S] =
|
||||
setting(scopedKey, app, source)
|
||||
|
||||
/** From the given [[Settings]], extract the value bound to this key. */
|
||||
/** From the given `Settings`, extract the value bound to this key. */
|
||||
final def get(settings: Settings[Scope]): Option[S] =
|
||||
settings.get(scopedKey.scope, scopedKey.key)
|
||||
|
||||
/**
|
||||
* Creates an [[Def.Initialize]] with value [[scala.None]] if there was no previous definition of this key,
|
||||
* and `[[scala.Some]](value)` if a definition exists. Useful for when you want to use the ''existence'' of
|
||||
* Creates an [[Def.Initialize]] with value `scala.None` if there was no previous definition of this key,
|
||||
* and `scala.Some(value)` if a definition exists. Useful for when you want to use the ''existence'' of
|
||||
* one setting in order to define another setting.
|
||||
* @return currently bound value wrapped in `Initialize[Some[T]]`, or `Initialize[None]` if unbound.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -25,25 +25,14 @@ object Util {
|
|||
)
|
||||
|
||||
lazy val baseScalacOptions = Seq(
|
||||
scalacOptions ++= Seq("-Xelide-below", "0"),
|
||||
scalacOptions ++= Seq(
|
||||
"-encoding",
|
||||
"utf8",
|
||||
"-deprecation",
|
||||
"-feature",
|
||||
"-unchecked",
|
||||
"-Xlint",
|
||||
"-Xelide-below",
|
||||
"0",
|
||||
"-language:existentials",
|
||||
"-language:higherKinds",
|
||||
"-language:implicitConversions",
|
||||
"-language:postfixOps",
|
||||
"-Xfuture",
|
||||
"-Yno-adapted-args",
|
||||
"-Ywarn-dead-code",
|
||||
"-Ywarn-numeric-widen",
|
||||
"-Ywarn-unused:-patvars,-implicits,_",
|
||||
"-Ywarn-unused-import"
|
||||
)
|
||||
),
|
||||
Compile / doc / scalacOptions -= "-Xlint",
|
||||
Compile / doc / scalacOptions -= "-Xfatal-warnings",
|
||||
)
|
||||
|
||||
def projectComponent: Setting[_] =
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ object ConcurrentRestrictions {
|
|||
warn: String => Unit
|
||||
): CompletionService[A, R] = {
|
||||
|
||||
/** Represents submitted work for a task.*/
|
||||
// Represents submitted work for a task.
|
||||
final class Enqueue(val node: A, val work: () => R)
|
||||
|
||||
new CompletionService[A, R] {
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ private[sbt] final class Execute[A[_] <: AnyRef](
|
|||
node,
|
||||
deps,
|
||||
active.toList
|
||||
/** active is mutable, so take a snapshot */
|
||||
/* active is mutable, so take a snapshot */
|
||||
)
|
||||
|
||||
if (active.isEmpty)
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class JUnitXmlTestsListener(val outputDir: String, logger: Logger) extends Tests
|
|||
|
||||
val (errors, failures, tests) = (count(TStatus.Error), count(TStatus.Failure), events.size)
|
||||
|
||||
/** Junit XML reports don't differentiate between ignored, skipped or pending tests */
|
||||
// Junit XML reports don't differentiate between ignored, skipped or pending tests
|
||||
val ignoredSkippedPending = count(TStatus.Ignored) + count(TStatus.Skipped) + count(
|
||||
TStatus.Pending
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue