Wouldn't it be nice if git and sbt could stop you from pushing code that are either badly formated, does not compile or breakes your tests?

git hooks to the rescue:

In your .git/hooks directory, rename pre-commit.sample to pre-commit and add the following lines:

If you didn’t add the scalariform plugin to your project yet please look up the instructions here: https://github.com/sbt/sbt-scalariform

If you are in a hurry you can use git commit -n to skip the hook.

If running all your tests is too time consuming, you might prefer the commented “compile” or “scalariformFormat” options.