pre-commit: add pre-commit configuration (#666)

This commit is contained in:
Caleb Doxsey 2020-05-07 08:13:30 -06:00 committed by GitHub
parent 3f4a22a10d
commit f5eaad54ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 2 deletions

6
.gitignore vendored
View file

@ -19,7 +19,7 @@ _test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
@ -81,4 +81,6 @@ docs/.vuepress/dist/
.changes.md
# autocert
.pomerium/
.pomerium/
!.pre-commit-config.yaml

20
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/syntaqx/git-hooks
rev: v0.0.16
hooks:
- id: go-mod-tidy
- repo: local
hooks:
- id: lint
name: lint
language: system
entry: make
args: ["lint"]
types: ["go"]