mirror of https://github.com/sbt/sbt.git
-Xlint
This commit is contained in:
parent
4a08ec9c60
commit
3e2aa82fde
|
|
@ -77,11 +77,11 @@ object Tracked
|
|||
trait Tracked
|
||||
{
|
||||
/** Cleans outputs and clears the cache.*/
|
||||
def clean: Unit
|
||||
def clean(): Unit
|
||||
}
|
||||
class Timestamp(val cacheFile: File, useStartTime: Boolean) extends Tracked
|
||||
{
|
||||
def clean = delete(cacheFile)
|
||||
def clean() = delete(cacheFile)
|
||||
/** Reads the previous timestamp, evaluates the provided function,
|
||||
* and then updates the timestamp if the function completes normally.*/
|
||||
def apply[T](f: Long => T): T =
|
||||
|
|
@ -99,7 +99,7 @@ class Timestamp(val cacheFile: File, useStartTime: Boolean) extends Tracked
|
|||
|
||||
class Changed[O](val cacheFile: File)(implicit equiv: Equiv[O], format: Format[O]) extends Tracked
|
||||
{
|
||||
def clean = delete(cacheFile)
|
||||
def clean() = delete(cacheFile)
|
||||
def apply[O2](ifChanged: O => O2, ifUnchanged: O => O2): O => O2 = value =>
|
||||
{
|
||||
if(uptodate(value))
|
||||
|
|
@ -136,7 +136,7 @@ object Difference
|
|||
}
|
||||
class Difference(val cache: File, val style: FilesInfo.Style, val defineClean: Boolean, val filesAreOutputs: Boolean) extends Tracked
|
||||
{
|
||||
def clean =
|
||||
def clean() =
|
||||
{
|
||||
if(defineClean) delete(raw(cachedFilesInfo)) else ()
|
||||
clearCache()
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ object Parser extends ParserMain
|
|||
if(!bad.isEmpty) error("Invalid example completions: " + bad.mkString("'", "', '", "'"))
|
||||
}
|
||||
def tuple[A,B](a: Option[A], b: Option[B]): Option[(A,B)] =
|
||||
(a,b) match { case (Some(av), Some(bv)) => Some(av, bv); case _ => None }
|
||||
(a,b) match { case (Some(av), Some(bv)) => Some((av, bv)); case _ => None }
|
||||
|
||||
def mapParser[A,B](a: Parser[A], f: A => B): Parser[B] =
|
||||
a.ifValid {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ private object Future
|
|||
def apply[T](f: => T): () => T =
|
||||
{
|
||||
val result = new SyncVar[Either[Throwable, T]]
|
||||
def run: Unit =
|
||||
def run(): Unit =
|
||||
try { result.set(Right(f)) }
|
||||
catch { case e: Exception => result.set(Left(e)) }
|
||||
Spawn(run)
|
||||
|
|
@ -100,7 +100,7 @@ object BasicIO
|
|||
{
|
||||
val continueCount = 1//if(in.isInstanceOf[PipedInputStream]) 1 else 0
|
||||
val buffer = new Array[Byte](BufferSize)
|
||||
def read
|
||||
def read()
|
||||
{
|
||||
val byteCount = in.read(buffer)
|
||||
if(byteCount >= continueCount)
|
||||
|
|
|
|||
Loading…
Reference in New Issue