From 296bdd19fa4ce4f5c18934156c625afad138fb90 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Wed, 1 Dec 2021 14:34:15 -0800 Subject: [PATCH] Add pre-commit hooks --- .pre-commit-config.yaml | 17 +++++++++++++++++ Makefile | 8 ++++++++ 2 files changed, 25 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..9928bdd --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 diff --git a/Makefile b/Makefile index 326ecc0..4c34422 100644 --- a/Makefile +++ b/Makefile @@ -55,3 +55,11 @@ shell: shell-x86 .PHONY: clean clean: docker-compose -f docker-compose-test-s3.yml down -v + +.PHONY: install-hooks +install-hooks: + pre-commit install + +.PHONY: check +check: + pre-commit run --all-files