Scala Bootstrap (base / project skeleton)
This is a repository intended to serve as a starting point if you want to bootstrap a project in Scala.
It could be useful if you want to start from scratch a kata or a little exercise or project. The idea is that you don't have to worry about the boilerplate, just clone this repo and there you go:
- Latest versions of Scala, SBT and ScalaTest in order to practice with them
- Best practices applied:
How To Start
Video screencast (in Spanish)
- Clone this repository
git clone https://github.com/CodelyTV/scala_bootstrap.
- Run SBT on the project directory
- Run the scalatests with
- Check the scalastyle in the production code with
sand use the
tscommand to check the test code style.
- Check the scalaFmt with
tfcommand to check the code style and apply guidelines with
- Start your project!
Pre-push Git hook
There's one Git hook included. It's inside the
doc/hooks folder and it will run the
prep SBT task before pushing to any remote.
prep task is intended to run all the checks you consider before pushing. At this very moment, it try to compile and check the code style rules with ScalaStyle and ScalaFmt.
You can define what this task does just modifying the
prep task in the
build.sbt file. We like the approach of just running 1 single SBT task as the hook instead of multiple tasks because it's more efficient (the hook doesn't has to run SBT multiple times), and also because this way we can control the pre push tasks just with the SBT alias defined at the
build.sbt without altering the hooks.
If you want to install this hook, just
cd doc/hooks and run
Other programming languages
We'll try to maintain this project as simple as possible, but Pull Requests are welcomed!
The MIT License (MIT). Please see License File for more information.