diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e57f862e6..137a8e06e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,23 +1,30 @@ # This is a configuration for https://pre-commit.com/. # On macOS, try `brew install pre-commit` and then run `pre-commit install`. +default_install_hook_types: [ pre-commit, commit-msg ] +default_stages: [ pre-commit ] repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - # TODO: find a version of this to validate ytt templates? - # - id: check-yaml - # args: ['--allow-multiple-documents'] - - id: check-json - - id: end-of-file-fixer - - id: trailing-whitespace - - id: check-merge-conflict - - id: check-added-large-files - - id: check-byte-order-marker - - id: detect-private-key - - id: mixed-line-ending - - repo: local - hooks: - - id: validate-copyright-year - name: Validate copyright year - entry: hack/check-copyright-year.sh - language: script + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + # TODO: find a version of this to validate ytt templates? + # - id: check-yaml + # args: ['--allow-multiple-documents'] + - id: check-json + - id: end-of-file-fixer + - id: trailing-whitespace + - id: check-merge-conflict + - id: check-added-large-files + - id: check-byte-order-marker + - id: detect-private-key + - id: mixed-line-ending + - repo: local + hooks: + - id: validate-copyright-year + name: Validate copyright year + entry: hack/check-copyright-year.sh + language: script + - id: check-signoff + name: Check for Signed-off-by + entry: 'grep -q "^Signed-off-by: "' + language: system + stages: [ commit-msg ]