mirror of https://github.com/sbt/sbt.git
Remove all warnings from commandProj
This commit is contained in:
parent
b4c5d9de31
commit
d99147d18c
|
|
@ -94,10 +94,13 @@ object BasicCommands {
|
|||
}
|
||||
|
||||
def completionsCommand: Command =
|
||||
Command(CompletionsCommand, CompletionsBrief, CompletionsDetailed)(completionsParser)(
|
||||
Command(CompletionsCommand, CompletionsBrief, CompletionsDetailed)(_ => completionsParser)(
|
||||
runCompletions(_)(_))
|
||||
|
||||
def completionsParser(state: State): Parser[String] = {
|
||||
@deprecated("No longer public", "1.1.1")
|
||||
def completionsParser(state: State): Parser[String] = completionsParser
|
||||
|
||||
private[this] def completionsParser: Parser[String] = {
|
||||
val notQuoted = (NotQuoted ~ any.*) map { case (nq, s) => nq ++ s }
|
||||
val quotedOrUnquotedSingleArgument = Space ~> (StringVerbatim | StringEscapable | notQuoted)
|
||||
token(quotedOrUnquotedSingleArgument ?? "" examples ("", " "))
|
||||
|
|
@ -175,19 +178,19 @@ object BasicCommands {
|
|||
}
|
||||
|
||||
def reboot: Command =
|
||||
Command(RebootCommand, Help.more(RebootCommand, RebootDetailed))(rebootOptionParser) {
|
||||
Command(RebootCommand, Help.more(RebootCommand, RebootDetailed))(_ => rebootOptionParser) {
|
||||
case (s, (full, currentOnly)) =>
|
||||
s.reboot(full, currentOnly)
|
||||
}
|
||||
|
||||
@deprecated("Use rebootOptionParser", "1.1.0")
|
||||
def rebootParser(s: State): Parser[Boolean] =
|
||||
rebootOptionParser(s) map { case (full, currentOnly) => full }
|
||||
def rebootParser(s: State): Parser[Boolean] = rebootOptionParser map { case (full, _) => full }
|
||||
|
||||
private[sbt] def rebootOptionParser(s: State): Parser[(Boolean, Boolean)] =
|
||||
token(
|
||||
Space ~> (("full" ^^^ ((true, false))) |
|
||||
("dev" ^^^ ((false, true))))) ?? ((false, false))
|
||||
private[sbt] def rebootOptionParser: Parser[(Boolean, Boolean)] = {
|
||||
val fullOption = "full" ^^^ ((true, false))
|
||||
val devOption = "dev" ^^^ ((false, true))
|
||||
token(Space ~> (fullOption | devOption)) ?? ((false, false))
|
||||
}
|
||||
|
||||
def call: Command =
|
||||
Command(ApplyCommand, Help.more(ApplyCommand, ApplyDetailed))(_ => callParser) {
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ import scala.util.Properties
|
|||
|
||||
trait Watched {
|
||||
|
||||
/** The files watched when an action is run with a preceeding ~ */
|
||||
def watchSources(s: State): Seq[Watched.WatchSource] = Nil
|
||||
/** The files watched when an action is run with a proceeding ~ */
|
||||
def watchSources(@deprecated("unused", "") s: State): Seq[Watched.WatchSource] = Nil
|
||||
def terminateWatch(key: Int): Boolean = Watched.isEnter(key)
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ private[sbt] final class ConsoleChannel(val name: String) extends CommandChannel
|
|||
case _ =>
|
||||
val x = makeAskUserThread(e.state)
|
||||
askUserThread = Some(x)
|
||||
x.start
|
||||
x.start()
|
||||
}
|
||||
case e: ConsoleUnpromptEvent =>
|
||||
e.lastSource match {
|
||||
|
|
@ -70,7 +70,7 @@ private[sbt] final class ConsoleChannel(val name: String) extends CommandChannel
|
|||
def shutdown(): Unit =
|
||||
askUserThread match {
|
||||
case Some(x) if x.isAlive =>
|
||||
x.interrupt
|
||||
x.interrupt()
|
||||
askUserThread = None
|
||||
case _ => ()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue