bouncerr
is a simple pre-commit hook to ensure your code follows coding best practices.
-
Install
pre-commit
withbrew install pre-commit
-
Install Docker on your machine (if you haven't already)
-
Initialize a Git repository for your project with
git init
-
Install the contents of
github.com/jeremyalv/bouncerr
using curl (no need to Git clone)curl -L https://github.com/jeremyalv/bouncerr/releases/download/1.0.0/bouncerr-1.0.0.zip -o bouncerr-1.0.0 && \ unzip bouncerr-1.0.0 && \ rm -r bouncerr-1.0.0
- Add the files to the staging area of your project using
git add
- Install pre-commits from the yaml config into your ./git/hooks using
pre-commit install
- Running the
https://github.com/gherynos/pre-commit-java
hook requires you to start Docker daemon on your machine (open Docker app). If you wish to disable this behavior, feel free to comment the hook in the config yaml file. - When you're ready to commit your changes, run
git commit
as usual and bouncerr will perform checks to ensure your project fulfills the established code quality - If you add any other pre-commit repo to the config, update using
pre-commit autoupdate
If the pre-commit-java
hook failed even while starting docker, check if your docker has adaquate permisisons. To grant the permissions, run sudo chown -R $(whoami) ~/.docker