repos: # Go formatting and linting - repo: https://github.com/golangci/golangci-lint rev: v1.55.2 hooks: - id: golangci-lint args: ['--timeout=5m'] # General file checks - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-json - id: check-merge-conflict - id: check-case-conflict - id: detect-private-key # Go security - repo: https://github.com/securego/gosec.git rev: v2.18.2 hooks: - id: gosec args: ['-no-fail', '-fmt=json'] entry: gosec # Spell checking (optional) - repo: https://github.com/codespell-project/codespell rev: v2.2.6 hooks: - id: codespell args: ['--ignore-words-list=cve,goo'] exclude: '\.go$'