brpaz
4/25/2020 - 5:09 PM

Pre-Commit golang config

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.0.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-added-large-files
  - repo: local
    hooks:
      - id: lint
        name: Lint code
        entry: make lint
        language: system
        types: [go]
      - id: format
        name: Format code
        entry: make fmt
        language: system
        types: [go]
      - id: format
        name: Unit tests
        entry: make test
        language: system
        types: [go]