|
| 1 | +--- |
| 2 | +- id: go-fmt |
| 3 | + name: 'gofmt' |
| 4 | + entry: pre-commit-hooks/gofmt.sh |
| 5 | + types: [go] |
| 6 | + exclude: '(^|/)vendor/' |
| 7 | + language: 'script' |
| 8 | + description: "Runs `gofmt`. Requires golang" |
| 9 | + pass_filenames: true |
| 10 | +- id: go-imports |
| 11 | + name: 'goimports' |
| 12 | + entry: pre-commit-hooks/go-imports.sh |
| 13 | + types: [go] |
| 14 | + exclude: '(^|/)vendor/' |
| 15 | + language: 'script' |
| 16 | + description: "Runs `goimports`. Requires golang and goimports" |
| 17 | + pass_filenames: true |
| 18 | +- id: go-vet |
| 19 | + name: 'go vet' |
| 20 | + entry: pre-commit-hooks/go-vet.sh |
| 21 | + types: [go] |
| 22 | + exclude: '(^|/)vendor/' |
| 23 | + language: 'script' |
| 24 | + description: "Runs `go vet`. Requires golang" |
| 25 | + pass_filenames: true |
| 26 | +- id: go-lint |
| 27 | + name: 'golint' |
| 28 | + entry: pre-commit-hooks/go-lint.sh |
| 29 | + types: [go] |
| 30 | + exclude: '(^|/)vendor/' |
| 31 | + language: 'script' |
| 32 | + description: "Runs `golint`. Requires golang and golint" |
| 33 | + pass_filenames: true |
| 34 | +- id: golangci-lint |
| 35 | + name: 'golangci-lint' |
| 36 | + entry: pre-commit-hooks/golangci-lint.sh |
| 37 | + types: [go] |
| 38 | + exclude: '(^|/)vendor/' |
| 39 | + language: 'script' |
| 40 | + description: "Runs `golangci-lint`. Requires golangci-lint" |
| 41 | + pass_filenames: true |
| 42 | +- id: go-critic |
| 43 | + name: "gocritic" |
| 44 | + entry: pre-commit-hooks/go-critic.sh |
| 45 | + types: [go] |
| 46 | + exclude: '(^|/)vendor/' |
| 47 | + language: 'script' |
| 48 | + description: "Runs `gocritic`. Requires gocritic" |
| 49 | + pass_filenames: true |
| 50 | +- id: go-unit-tests |
| 51 | + name: 'go test' |
| 52 | + entry: pre-commit-hooks/go-unit-tests.sh |
| 53 | + types: [go] |
| 54 | + exclude: '(^|/)vendor/' |
| 55 | + language: 'script' |
| 56 | + description: "Runs `go test`" |
| 57 | + pass_filenames: false |
| 58 | +- id: go-build |
| 59 | + name: 'go build' |
| 60 | + entry: pre-commit-hooks/go-build.sh |
| 61 | + types: [go] |
| 62 | + language: 'script' |
| 63 | + description: "Runs `go build`" |
| 64 | + pass_filenames: false |
| 65 | +- id: go-generate |
| 66 | + name: 'go generate' |
| 67 | + entry: pre-commit-hooks/go-build.sh |
| 68 | + types: [go] |
| 69 | + language: 'script' |
| 70 | + description: "Runs `go generate`" |
| 71 | + pass_filenames: true |
| 72 | +- id: go-mod-tidy |
| 73 | + name: 'go mod tidy' |
| 74 | + entry: pre-commit-hooks/go-mod-tidy.sh |
| 75 | + types: [go] |
| 76 | + language: 'script' |
| 77 | + description: "Runs `go mod tidy -v`" |
| 78 | + pass_filenames: true |
| 79 | +- id: go-mod-vendor |
| 80 | + name: 'go mod vendor' |
| 81 | + entry: pre-commit-hooks/go-mod-vendor.sh |
| 82 | + types: [go] |
| 83 | + language: 'script' |
| 84 | + description: "Runs `go mod vendor`" |
| 85 | + pass_filenames: false |
0 commit comments