Add pre-commit hooks

Fixes #12
This commit is contained in:
ViViDboarder 2020-05-19 13:38:40 -07:00
parent f261ba1939
commit 4109dcabcd
2 changed files with 26 additions and 2 deletions

17
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,17 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.0.1
hooks:
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.7.1.1
hooks:
- id: shellcheck
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: v2.0.0
hooks:
- id: docker-compose-check
- id: hadolint

View File

@ -4,10 +4,17 @@
default: test
.PHONY: test
test:
test: check
docker-compose -f ./tests/docker-compose-private.yml up \
--build --force-recreate \
--abort-on-container-exit --exit-code-from plugin
docker-compose -f ./tests/docker-compose-public.yml up \
--build --force-recreate \
--abort-on-container-exit --exit-code-from plugin
.PHONY: install-hooks
install-hooks:
pre-commit install
.PHONY: check
check:
pre-commit run --all-files