Starter project for Code Katas in Scala. Batteries included.
Included:
- Sbt (build tool)
- Sbt-tpolecat (strict compiler options)
- Sbt Extras (wrapper script)
- Scalatest (testing library)
- ScalaCheck (property-based testing library)
- ApprovalTests (approval testing library)
- scoverage (code coverage)
- Mockito (mocking library)
- Cats (functional programming library)
- Scalafmt (code formatting)
- Scalafix (refactoring and linting)
- Scala Steward (automatic dependency updates)
- CI using Github Actions
- Fast feedback using git hooks (pre-commit, pre-push)
This project requires a JDK on your machine, as described in the .sdkmanrc
. If you use sdkman cd
into the
root of this project and run:
sdk env install
to install it. You can also install them yourself.
The build tool (Sbt) and Scala are installed automatically by the wrapper script located at ./sbtx
.
It will grab the correct versions based off the project configuration.
./sbtx compile
Run tests once:
./sbtx test
Or in watch mode:
./sbtx ~test
./sbtx scalafmtAll
./sbtx scalafixAll
For generating a code coverage report run:
./sbtx clean coverage test coverageReport
Which generates a report in target/scala-2.13/scoverage-report
.
To install the git hooks run:
./hooks/install
If you're using Intellij, make sure you have the Scala plugin installed.