go-imports doesn't work
jonyhy96 opened this issue · 4 comments
jonyhy96 commented
description
enviroment:
- go1.13 darwin/amd64
- pre-commit 1.18.3
.pre-commit-config.yaml:
repos:
- repo: git://github.com/dnephin/pre-commit-golang
rev: v0.3.4
hooks:
- id: go-fmt
- id: go-vet
- id: go-imports
exclude: 'vendor'
- id: go-lint
- id: go-critic
exclude: 'vendor'
- id: golangci-lint
error:
[ERROR] `go-imports` is not present in repository git://github.com/dnephin/pre-commit-golang. Typo? Perhaps it is introduced in a newer version? Often `pre-commit autoupdate` fixes this.
$ pre-commit autoupdate
Updating git://github.com/dnephin/pre-commit-golang...already up to date.
jonyhy96 commented
.pre-commit-config.yaml:
repos:
- repo: git://github.com/dnephin/pre-commit-golang
rev: master
hooks:
- id: go-fmt
- id: go-vet
- id: go-imports
exclude: 'vendor'
- id: go-lint
- id: go-critic
exclude: 'vendor'
- id: golangci-lint
errors:
[ERROR] `go-imports` is not present in repository git://github.com/dnephin/pre-commit-golang. Typo? Perhaps it is introduced in a newer version? Often `pre-commit autoupdate` fixes this.
$ pre-commit autoupdate
Updating git://github.com/dnephin/pre-commit-golang...Cannot update because the tip of master is missing these hooks:
go-imports
jonyhy96 commented
The configure bellow works.Maybe we should make another tag 😃
.pre-commit-config.yaml:
repos:
- repo: git://github.com/dnephin/pre-commit-golang
rev: 6982e808a
hooks:
- id: go-fmt
- id: go-vet
- id: go-imports
exclude: 'vendor'
- id: go-lint
- id: go-critic
exclude: 'vendor'
- id: golangci-lint
dnephin commented
Tagged v0.3.5: https://github.com/dnephin/pre-commit-golang/releases/tag/v0.3.5
I guess it could have been v0.4.0, oh well