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

Commit

Permalink
Merge pull request #22 from kailuowang/add-xlint
Browse files Browse the repository at this point in the history
refine xlint, added simulacrumSettings
  • Loading branch information
kailuowang authored May 9, 2017
2 parents b04f9e8 + 245ebd3 commit ad64747
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/main/scala/sbtcatalysts/CatalystsPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ trait CatalystsBase {
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-unchecked",
"-Xlint"
"-unchecked"
)

/** Scalac options for additional language options.*/
Expand Down Expand Up @@ -387,6 +386,21 @@ trait CatalystsBase {
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)).toSeq
)

lazy val xlintSettings = Seq(
scalacOptions += {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 12)) => "-Xlint:-unused,_" //Xling:unused warn against unused implicit evidence
case _ => "-Xlint"
}
}
)

def simulacrumSettings(v: Versions) = Seq(
libraryDependencies ++= Seq(
"com.github.mpilquist" %%% "simulacrum" % v.vers("simulacrum") % "compile-time"),
ivyConfigurations += config("compile-time").hide,
unmanagedClasspath in Compile ++= update.value.select(configurationFilter("compile-time"))
)
// Builder methods

/**
Expand Down

0 comments on commit ad64747

Please sign in to comment.