address more warnings

This commit is contained in:
Eugene Yokota 2018-09-18 17:45:24 -04:00
parent 4b23036c63
commit ef49a95b7d
9 changed files with 14 additions and 26 deletions

View File

@ -193,7 +193,6 @@ val completeProj = (project in file("internal") / "util-complete")
testedBaseSettings, testedBaseSettings,
name := "Completion", name := "Completion",
libraryDependencies += jline, libraryDependencies += jline,
Compile / scalacOptions += "-Ywarn-unused:-explicits",
mimaSettings, mimaSettings,
// Parser is used publicly, so we can't break bincompat. // Parser is used publicly, so we can't break bincompat.
mimaBinaryIssueFilters := Seq( mimaBinaryIssueFilters := Seq(

View File

@ -67,7 +67,7 @@ object Instance {
* *
* Each `input` in each expression of the form `wrap[T]( input )` is transformed by `convert`. * 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]`. * 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. * 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 * 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. * that unpacks the tuple containing the results of the inputs.

View File

@ -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 * 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. * TAB key in the console.
*/ */
trait ExampleSource { trait ExampleSource {

View File

@ -42,7 +42,7 @@ final case class Clauses(clauses: List[Clause]) {
/** When the `body` Formula succeeds, atoms in `head` are true. */ /** When the `body` Formula succeeds, atoms in `head` are true. */
final case class Clause(body: Formula, head: Set[Atom]) 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 { sealed abstract class Literal extends Formula {
/** The underlying (positive) atom. */ /** The underlying (positive) atom. */

View File

@ -280,13 +280,13 @@ object Scoped {
final def set(app: Initialize[S], source: SourcePosition): Setting[S] = final def set(app: Initialize[S], source: SourcePosition): Setting[S] =
setting(scopedKey, app, source) 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] = final def get(settings: Settings[Scope]): Option[S] =
settings.get(scopedKey.scope, scopedKey.key) settings.get(scopedKey.scope, scopedKey.key)
/** /**
* Creates an [[Def.Initialize]] with value [[scala.None]] if there was no previous definition of this 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 * 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. * one setting in order to define another setting.
* @return currently bound value wrapped in `Initialize[Some[T]]`, or `Initialize[None]` if unbound. * @return currently bound value wrapped in `Initialize[Some[T]]`, or `Initialize[None]` if unbound.
*/ */

View File

@ -25,25 +25,14 @@ object Util {
) )
lazy val baseScalacOptions = Seq( lazy val baseScalacOptions = Seq(
scalacOptions ++= Seq("-Xelide-below", "0"),
scalacOptions ++= Seq( scalacOptions ++= Seq(
"-encoding", "-Xelide-below",
"utf8", "0",
"-deprecation",
"-feature",
"-unchecked",
"-Xlint",
"-language:existentials", "-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-language:postfixOps", "-language:postfixOps",
"-Xfuture", ),
"-Yno-adapted-args", Compile / doc / scalacOptions -= "-Xlint",
"-Ywarn-dead-code", Compile / doc / scalacOptions -= "-Xfatal-warnings",
"-Ywarn-numeric-widen",
"-Ywarn-unused:-patvars,-implicits,_",
"-Ywarn-unused-import"
)
) )
def projectComponent: Setting[_] = def projectComponent: Setting[_] =

View File

@ -142,7 +142,7 @@ object ConcurrentRestrictions {
warn: String => Unit warn: String => Unit
): CompletionService[A, R] = { ): CompletionService[A, R] = {
/** Represents submitted work for a task.*/ // Represents submitted work for a task.
final class Enqueue(val node: A, val work: () => R) final class Enqueue(val node: A, val work: () => R)
new CompletionService[A, R] { new CompletionService[A, R] {

View File

@ -215,7 +215,7 @@ private[sbt] final class Execute[A[_] <: AnyRef](
node, node,
deps, deps,
active.toList active.toList
/** active is mutable, so take a snapshot */ /* active is mutable, so take a snapshot */
) )
if (active.isEmpty) if (active.isEmpty)

View File

@ -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) 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( val ignoredSkippedPending = count(TStatus.Ignored) + count(TStatus.Skipped) + count(
TStatus.Pending TStatus.Pending
) )