mirror of https://github.com/sbt/sbt.git
Merge pull request #1308 from sbt/wip/moreformatting
some more source getting formatted
This commit is contained in:
commit
aa4ee809e5
|
|
@ -157,7 +157,7 @@ final class Update(config: UpdateConfiguration) {
|
||||||
val target1 = (depVersion, target) match {
|
val target1 = (depVersion, target) match {
|
||||||
case (Some(dv), u: UpdateApp) =>
|
case (Some(dv), u: UpdateApp) =>
|
||||||
import u._; new UpdateApp(id.copy(version = new Explicit(dv)), classifiers, tpe)
|
import u._; new UpdateApp(id.copy(version = new Explicit(dv)), classifiers, tpe)
|
||||||
case _ => target
|
case _ => target
|
||||||
}
|
}
|
||||||
setScalaVariable(settings, autoScalaVersion)
|
setScalaVariable(settings, autoScalaVersion)
|
||||||
retrieve(eventManager, moduleID, target1, autoScalaVersion)
|
retrieve(eventManager, moduleID, target1, autoScalaVersion)
|
||||||
|
|
|
||||||
|
|
@ -112,17 +112,17 @@ private[sbt] object ForkTests {
|
||||||
private final class React(is: ObjectInputStream, os: ObjectOutputStream, log: Logger, listeners: Seq[TestReportListener], results: mutable.Map[String, SuiteResult]) {
|
private final class React(is: ObjectInputStream, os: ObjectOutputStream, log: Logger, listeners: Seq[TestReportListener], results: mutable.Map[String, SuiteResult]) {
|
||||||
import ForkTags._
|
import ForkTags._
|
||||||
@annotation.tailrec def react(): Unit = is.readObject match {
|
@annotation.tailrec def react(): Unit = is.readObject match {
|
||||||
case `Done` =>
|
case `Done` =>
|
||||||
os.writeObject(Done); os.flush()
|
os.writeObject(Done); os.flush()
|
||||||
case Array(`Error`, s: String) =>
|
case Array(`Error`, s: String) =>
|
||||||
log.error(s); react()
|
log.error(s); react()
|
||||||
case Array(`Warn`, s: String) =>
|
case Array(`Warn`, s: String) =>
|
||||||
log.warn(s); react()
|
log.warn(s); react()
|
||||||
case Array(`Info`, s: String) =>
|
case Array(`Info`, s: String) =>
|
||||||
log.info(s); react()
|
log.info(s); react()
|
||||||
case Array(`Debug`, s: String) =>
|
case Array(`Debug`, s: String) =>
|
||||||
log.debug(s); react()
|
log.debug(s); react()
|
||||||
case t: Throwable =>
|
case t: Throwable =>
|
||||||
log.trace(t); react()
|
log.trace(t); react()
|
||||||
case Array(group: String, tEvents: Array[Event]) =>
|
case Array(group: String, tEvents: Array[Event]) =>
|
||||||
listeners.foreach(_ startGroup group)
|
listeners.foreach(_ startGroup group)
|
||||||
|
|
|
||||||
|
|
@ -219,9 +219,9 @@ object BasicCommands {
|
||||||
|
|
||||||
def runAlias(s: State, args: Option[(String, Option[Option[String]])]): State =
|
def runAlias(s: State, args: Option[(String, Option[Option[String]])]): State =
|
||||||
args match {
|
args match {
|
||||||
case None =>
|
case None =>
|
||||||
printAliases(s); s
|
printAliases(s); s
|
||||||
case Some(x ~ None) if !x.isEmpty =>
|
case Some(x ~ None) if !x.isEmpty =>
|
||||||
printAlias(s, x.trim); s
|
printAlias(s, x.trim); s
|
||||||
case Some(name ~ Some(None)) => removeAlias(s, name.trim)
|
case Some(name ~ Some(None)) => removeAlias(s, name.trim)
|
||||||
case Some(name ~ Some(Some(value))) => addAlias(s, name.trim, value.trim)
|
case Some(name ~ Some(Some(value))) => addAlias(s, name.trim, value.trim)
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ object CommandUtil {
|
||||||
|
|
||||||
def withAttribute[T](s: State, key: AttributeKey[T], ifMissing: String)(f: T => State): State =
|
def withAttribute[T](s: State, key: AttributeKey[T], ifMissing: String)(f: T => State): State =
|
||||||
(s get key) match {
|
(s get key) match {
|
||||||
case None =>
|
case None =>
|
||||||
s.log.error(ifMissing); s.fail
|
s.log.error(ifMissing); s.fail
|
||||||
case Some(nav) => f(nav)
|
case Some(nav) => f(nav)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,9 +81,9 @@ object Scope {
|
||||||
ref match {
|
ref match {
|
||||||
case ThisProject | LocalRootProject => ProjectRef(current, rootProject(current))
|
case ThisProject | LocalRootProject => ProjectRef(current, rootProject(current))
|
||||||
case LocalProject(id) => ProjectRef(current, id)
|
case LocalProject(id) => ProjectRef(current, id)
|
||||||
case RootProject(uri) =>
|
case RootProject(uri) =>
|
||||||
val res = resolveBuild(current, uri); ProjectRef(res, rootProject(res))
|
val res = resolveBuild(current, uri); ProjectRef(res, rootProject(res))
|
||||||
case ProjectRef(uri, id) => ProjectRef(resolveBuild(current, uri), id)
|
case ProjectRef(uri, id) => ProjectRef(resolveBuild(current, uri), id)
|
||||||
}
|
}
|
||||||
def resolveBuildRef(current: URI, ref: BuildReference): BuildRef =
|
def resolveBuildRef(current: URI, ref: BuildReference): BuildRef =
|
||||||
ref match {
|
ref match {
|
||||||
|
|
|
||||||
|
|
@ -1384,10 +1384,10 @@ object Classpaths {
|
||||||
{
|
{
|
||||||
val ms: Seq[(String, Seq[String])] =
|
val ms: Seq[(String, Seq[String])] =
|
||||||
trim(confString.split("->", 2)) match {
|
trim(confString.split("->", 2)) match {
|
||||||
case x :: Nil => for (a <- parseList(x, masterConfs)) yield (a, default(a))
|
case x :: Nil => for (a <- parseList(x, masterConfs)) yield (a, default(a))
|
||||||
case x :: y :: Nil =>
|
case x :: y :: Nil =>
|
||||||
val target = parseList(y, depConfs); for (a <- parseList(x, masterConfs)) yield (a, target)
|
val target = parseList(y, depConfs); for (a <- parseList(x, masterConfs)) yield (a, target)
|
||||||
case _ => error("Invalid configuration '" + confString + "'") // shouldn't get here
|
case _ => error("Invalid configuration '" + confString + "'") // shouldn't get here
|
||||||
}
|
}
|
||||||
val m = ms.toMap
|
val m = ms.toMap
|
||||||
s => m.getOrElse(s, Nil)
|
s => m.getOrElse(s, Nil)
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ final class ProjectNavigation(s: State) {
|
||||||
|
|
||||||
def apply(action: Option[ResolvedReference]): State =
|
def apply(action: Option[ResolvedReference]): State =
|
||||||
action match {
|
action match {
|
||||||
case None =>
|
case None =>
|
||||||
show(); s
|
show(); s
|
||||||
case Some(BuildRef(uri)) => changeBuild(uri)
|
case Some(BuildRef(uri)) => changeBuild(uri)
|
||||||
case Some(ProjectRef(uri, id)) => selectProject(uri, id)
|
case Some(ProjectRef(uri, id)) => selectProject(uri, id)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ private[sbt] object InheritInput {
|
||||||
def apply(p: JProcessBuilder): Boolean = (redirectInput, inherit) match {
|
def apply(p: JProcessBuilder): Boolean = (redirectInput, inherit) match {
|
||||||
case (Some(m), Some(f)) =>
|
case (Some(m), Some(f)) =>
|
||||||
m.invoke(p, f); true
|
m.invoke(p, f); true
|
||||||
case _ => false
|
case _ => false
|
||||||
}
|
}
|
||||||
|
|
||||||
private[this] val pbClass = Class.forName("java.lang.ProcessBuilder")
|
private[this] val pbClass = Class.forName("java.lang.ProcessBuilder")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue