Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Turn on -Ywarn-unused:patvars #228

Merged
merged 1 commit into from
Feb 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ lazy val commonSettings = Seq(
"-Ywarn-unused:imports", // Warn if an import selector is not referenced.
"-Ywarn-unused:locals", // Warn if a local definition is unused.
"-Ywarn-unused:params", // Warn if a value parameter is unused.
// "-Ywarn-unused:patvars", // Warn if a variable bound in a pattern is unused.
"-Ywarn-unused:patvars", // Warn if a variable bound in a pattern is unused.
"-Ywarn-unused:privates", // Warn if a private member is unused.
"-Ywarn-value-discard", // Warn when non-Unit expression results are unused.
"-Yinduction-heuristics", // speeds up the compilation of inductive implicit resolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class FormatSpec extends CatsSuite {
forAll { (n: Int) =>
Either.catchNonFatal(example.unsafeGet(n)) match {
case Left(t) => t.getMessage shouldEqual s"unsafeGet failed: $n"
case Right(b) => true
case Right(_) => true
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/ctl/src/main/scala/low/docker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ object docker {

def allContainerNames: CtlIO[List[String]] =
docker("ps", "-a", "--format", "{{.Names}}").require {
case Output(o, ss) => ss
case Output(_, ss) => ss
}

def getLabelValue(label: String, k: Container): CtlIO[String] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ object HorizonsNameQuery {
f(offsets).map(g => rows.takeWhile(_.trim.nonEmpty).map(g)).toRight("Not enough columns.")
} catch {
case nfe: NumberFormatException => ("Number format exception: " + nfe.getMessage).asLeft
case sioobe: StringIndexOutOfBoundsException => "Column value(s) not found.".asLeft
case _: StringIndexOutOfBoundsException => "Column value(s) not found.".asLeft
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ object HorizonsUpdaterApp {
keys.traverse { keyStr =>
EphemerisKey.fromString.getOption(keyStr) match {
case Some(key: EphemerisKey.Horizons) => Either.right(key)
case Some(key) => Either.left(s"'$keyStr' is not an horizons key")
case Some(_) => Either.left(s"'$keyStr' is not an horizons key")
case None => Either.left(s"Could not parse '$keyStr' as an horizons key")
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/ocs2/src/main/scala/gem/ocs2/Importer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object Importer extends DoobieClient {
for {
_ <- l.log(u, s"remove program ${p.id}" )(rmProgram )
_ <- l.log(u, s"insert new version of ${p.id}")(ProgramDao.insert(p))
_ <- p.observations.toList.traverse_ { case (i,o) =>
_ <- p.observations.toList.traverse_ { case (i, _) =>
val oid = Observation.Id(p.id, i)
l.log(u, s"write datasets for $oid")(datasets.write(oid, dsMap(oid)))
}
Expand Down