Skip to content

Instantly share code, notes, and snippets.

@irwinby
Created July 8, 2022 16:58
Show Gist options
  • Save irwinby/57fb3078259b533392e7e5048f58322e to your computer and use it in GitHub Desktop.
Save irwinby/57fb3078259b533392e7e5048f58322e to your computer and use it in GitHub Desktop.
pre-commit hooks for the Go application
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-merge-conflict
- repo: local
hooks:
- id: lint
name: lint
language: system
entry: golangci-lint run -v --allow-parallel-runners
- id: tidy
name: tidy
language: system
entry: go mod tidy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment