Docker image to run pre-commit (http://pre-commit.com/)
144
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: master # Use the ref you want to point at
hooks:
- { id: check-case-conflict }
- { id: check-merge-conflict }
- { id: check-symlinks }
- { id: check-json }
- { id: check-yaml }
- { id: detect-private-key }
- { id: end-of-file-fixer }
- { id: trailing-whitespace }
cd $(git rev-parse --show-toplevel)
NAME=$(basename `git rev-parse --show-toplevel`)_precommit
docker ps -a | grep $NAME &> /dev/null
CONTAINER_EXISTS=$?
if [[ CONTAINER_EXISTS -eq 0 ]]; then
docker stop $NAME && docker rm $NAME
fi
docker run --rm -t -v $(pwd):/pre-commit --name $NAME thangit93/pre-commit pre-commit run --all-files
Content type
Image
Digest
sha256:7e9abef72…
Size
412.1 MB
Last updated
about 3 years ago
docker pull thangit93/pre-commit