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,
name := "Completion",
libraryDependencies += jline,
Compile / scalacOptions += "-Ywarn-unused:-explicits",
mimaSettings,
// Parser is used publicly, so we can't break bincompat.
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`.
* 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.

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
* [[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 {

View File

@ -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. */

View File

@ -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.
*/

View File

@ -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[_] =

View File

@ -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] {

View File

@ -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)

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)
/** 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
)