diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..633f7c2 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,16 @@ +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: check-yaml + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck + - repo: https://github.com/tekwizely/pre-commit-golang + rev: master + hooks: + - id: go-test-mod + - id: go-fmt + - id: go-vet-mod diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..6dac009 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [[ -z "$(command -v pipx)" ]]; then + echo "ERROR: Pre-commit tooling requires pipx to be available." + exit 1 +fi + +pipx run pre-commit install