Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update pre-commit config #238

Merged
merged 3 commits into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
repos:
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.0
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-fmt
- id: go-vet
- id: go-imports
- id: go-cyclo
args: [-over=15]
- id: validate-toml
- id: no-go-testing
- id: golangci-lint
- id: go-critic
- id: go-unit-tests
- id: go-build
- id: go-test-mod
- id: go-build-mod
- id: go-mod-tidy
- id: my-cmd
name: go-cyclo
alias: go-cyclo
args: [ go, cyclo, -over=15]
- id: my-cmd
name: "Check files aren't using go's testing package"
entry: 'testing\.T'
files: 'test_.*\.go$'
language: 'pygrep'
description: >
Checks that no files are using `testing.T`, if you want developers to use
a different testing framework
- id: my-cmd
name: 'validate toml'
entry: 'tomlv'
files: '\.toml$'
language: 'system'
description: >
Runs `tomlv`, requires https://github.com/BurntSushi/toml/tree/master/cmd/tomlv"
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.3
rev: v8.18.1
hooks:
- id: gitleaks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace