-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
46 lines (46 loc) · 1.22 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
# Pre commit configuration script
#
# Usage
# -----
# 1. install pre-commit
# > brew install pre-commit
# 2. create a .pre-commit-config.yml with all the validation you want
# 3. install hooks in git hooks
# > pre-commit install
#
# 4. install hook dependencies
# > go get github.com/fzipp/gocyclo
# > go get -u golang.org/x/lint/golint
# > brew install golangci/tap/golangci-lint
#
# 5. see pre-commit warnings
# > pre-commit run --all-files
#
# 6. fix issues before any commit
#
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
- id: check-merge-conflict
- id: detect-private-key
- id: mixed-line-ending
- repo: git://github.com/dnephin/pre-commit-golang
rev: master
hooks:
- id: no-go-testing
- id: go-fmt
# For more info go to: https://github.com/golangci/golangci-lint
# - id: golangci-lint
# args: ["-E", "gofmt", "-E", "gocyclo", "-E", "gocritic", "-E", "bodyclose"]
- id: go-unit-tests
- id: go-build
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
rev: v0.1.0
hooks:
- id: dockerfilelint