Strict Coding Style SBT project (using giter8)

by 3/18/2015 10:39:00 AM 0 comments
At this moment ScalaDays is going on in nearby San Francisco. I came across a Toward a Safer Scala talk that emphasized writing safer Scala using strict static code analysis. After watching the talk I put together a giter8 template that implements their recommendations. If you have giter8 installed you can try out the basicscala template using:

g8 hohonuuli/basicscala.g8
Here's some things that this template provides:
  • Formats source files on compile using Scalariform
  • Adds strict scala compiler flags in build.sbt
  • Build fails on compiler warnings
  • Adds Wartremover to Scala's linter. You can run lint and wartremover in sbt using 'lint:compile'.
  • Includes junit and scalatest
  • Includes scala-style for checking code sytle. You will need to run 'sbt scalastyleGenerateConfig' to generate a scalastyle-config file. After which, you can run 'sbt scalastyle' to check your projects.

Brian Schlining


Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.