Skip to content

Instantly share code, notes, and snippets.

@hiro-hori
Created April 14, 2017 07:56
Show Gist options
  • Save hiro-hori/1f946df1276885a23fd45982006bc6bc to your computer and use it in GitHub Desktop.
Save hiro-hori/1f946df1276885a23fd45982006bc6bc to your computer and use it in GitHub Desktop.
name := "hoge"
version := "1.0"
scalaVersion := "2.12.1"
val optionsForCompile = Seq(
"-Ywarn-unused",
"-Ywarn-unused-import",
"-Xfatal-warnings"
)
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-unchecked",
"-Xlint",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard"
)
scalacOptions ++= optionsForCompile
Seq(Compile, Test).flatMap(c =>
scalacOptions in (c, console) ~= {_.filterNot(optionsForCompile.toSet)}
)
@hiro-hori
Copy link
Author

REPLでunusedやunused-importでこけたくない

referred to
http://qiita.com/kawachi/items/1c1d063de91c5445e8bc
http://d.hatena.ne.jp/xuwei/20150417/1429242775

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment