Permalink
Browse files

scala: Enable more compiler warnings in Ammonite

Should do lint warnings too once I figure out the programmatic API for
that, but I'm in a hurry.

Also add "amm" to the prompt to distinguish it from default sbt prompt.
  • Loading branch information...
1 parent a3892f1 commit fa0ac6593c180d7f203550dbb688e894c5f14855 @ches committed Jul 9, 2017
Showing with 8 additions and 4 deletions.
  1. +8 −4 .ammonite/predef.sc
View
@@ -2,11 +2,15 @@
// See http://www.lihaoyi.com/Ammonite/#Configuration
// Not really digging the @ sign prompt.
-repl.prompt() = "\n> "
+repl.prompt() = "\namm> "
-// Love the double negative... enable compiler warnings
-interp.configureCompiler(_.settings.nowarnings.value = false)
+interp.configureCompiler { comp =>
+ // Love the double negative... enable compiler warnings
+ comp.settings.nowarnings.value = false
+ comp.settings.deprecation.value = true
+ comp.settings.unchecked.value = true
+}
// Load utility definitions shared with default scala REPL
try repl.load.exec(ammonite.ops.home/".config"/'scala/"replinit.scala")
-catch { case _: Exception => println("=== replrc not loaded! ===") }
+catch { case _: Exception => println("=== replinit defs not loaded! ===") }

0 comments on commit fa0ac65

Please sign in to comment.