/registry

GBIF Registry

Primary LanguageJavaApache License 2.0Apache-2.0

Build Status Quality Gate Status Coverage

registry-spring-boot

Code style

The registry uses google code style and spotless. To configure an automatic pre-commit hook to check code add a file 'pre-commit' to directory .git/hooks. File's content should be:

#!/bin/sh

echo '[git hook] executing spotless check before commit'

# stash any unstaged changes
git stash -q --keep-index

# run the check with the maven
mvn spotless:check

# store the last exit code in a variable
RESULT=$?

# unstash the unstashed changes
git stash pop -q

# return the 'mvn spotless:check' exit code
exit $RESULT