diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bdb39e2..f8d3b99 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,17 +1,31 @@ repos: - - repo: https://github.com/turo/pre-commit-hooks - rev: v3.4.2 + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 hooks: - - id: go-mod-tidy - - id: go-build - - id: golangci-lint - - id: go-test-unit - - id: gomarkdoc - # - id: docker-lint # Getting in the way - - id: docker-compose-lint + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.1.0 + hooks: + - id: prettier + stages: [commit] - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - rev: v9.5.0 + rev: v9.9.0 + hooks: + - id: commitlint + stages: [commit-msg] + additional_dependencies: ["@open-turo/commitlint-config-conventional"] + - repo: https://github.com/rhysd/actionlint + rev: v1.6.17 + hooks: + - id: actionlint + - repo: https://github.com/jumanjihouse/pre-commit-hooks + rev: 3.0.0 + hooks: + - id: shellcheck + # - id: shfmt + - repo: https://github.com/hadolint/hadolint + rev: v2.12.0 hooks: - - id: commitlint - stages: [commit-msg] - additional_dependencies: ["@open-turo/commitlint-config-conventional"] + - id: hadolint diff --git a/files/.githooks/prepare-commit-msg b/files/.githooks/prepare-commit-msg index 2f006dc..5f63f53 100755 --- a/files/.githooks/prepare-commit-msg +++ b/files/.githooks/prepare-commit-msg @@ -1,7 +1,11 @@ #!/bin/sh +# This hook runs the commitizen script when you commit to prompt you to create +# conventional commit messages + # Exit quietly if cz doesn't exist [ -x "$(command -v cz)" ] || exit 0 # Prevent issues when rebasing [ "$1" = ".git/COMMIT_EDITMSG" ] && [ "$2" = "message" ] && exit 0 # Run the commitizen script -exec < /dev/tty && cz --hook || true \ No newline at end of file +# shellcheck disable=SC2015 +exec < /dev/tty && cz --hook || true diff --git a/install/linux_amd64/actionlint b/install/linux_amd64/actionlint new file mode 100644 index 0000000..473a5fb --- /dev/null +++ b/install/linux_amd64/actionlint @@ -0,0 +1,3 @@ +#!/bin/dash -e +# Install or upgrade +$RUN brew "$( { [ -z "$UPGRADE" ] && echo "install"; } || echo "upgrade" )" "$NAME" diff --git a/install/linux_amd64/hadolint b/install/linux_amd64/hadolint new file mode 100644 index 0000000..473a5fb --- /dev/null +++ b/install/linux_amd64/hadolint @@ -0,0 +1,3 @@ +#!/bin/dash -e +# Install or upgrade +$RUN brew "$( { [ -z "$UPGRADE" ] && echo "install"; } || echo "upgrade" )" "$NAME"