Skip to content

Instantly share code, notes, and snippets.

@leifwickland
Last active February 1, 2018 14:49
Show Gist options
  • Save leifwickland/b780bc78a85e6435562f to your computer and use it in GitHub Desktop.
Save leifwickland/b780bc78a85e6435562f to your computer and use it in GitHub Desktop.
// Adapted from Rob Norris' post at https://tpolecat.github.io/2014/04/11/scalac-flags.html
scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8", // yes, this is 2 args
"-feature",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code", // N.B. doesn't work well with the ??? hole
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Xfuture"
)
// I want to recommend this but it dramatically slows the compiler
// "-Ywarn-unused-import" // 2.11 only.
// I removed the following because I prefer to opt into these on a per file basis.
// I think the compiler's warnings about these are a benefit to novices.
// "-language:existentials",
// "-language:higherKinds",
// "-language:implicitConversions",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment