diff --git a/.gitignore b/.gitignore index 3d6b6620a..52fc045c0 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ \ No newline at end of file +.pomerium/ + +!.pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..a25f15666 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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"]