Skip to content

Commit

Permalink
scala: Enable more compiler warnings in Ammonite
Browse files Browse the repository at this point in the history
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
ches committed Jul 9, 2017
1 parent a3892f1 commit fa0ac65
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .ammonite/predef.sc
Original file line number Diff line number Diff line change
Expand Up @@ -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.