pre-commit-golang
pre-commit-golang copied to clipboard
pass current directory golangci-lint when specifying a configfile
# golang pre commits
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.4.0
hooks:
- id: go-fmt
- id: go-vet
- id: go-lint
- id: go-imports
- id: no-go-testing
- id: golangci-lint
args: ["-vc .golang-ci.yml"]
results in
ERRO Can't read config: can't read viper config: open .golang-ci.yml: no such file or directory
is there anyway I can prepend $PWD
to golangci lint pre commit hook?
Okay even with the fullpath its failing:
ERRO Can't read config: can't read viper config: open /home/..../.golang-ci.yml: no such file or directory
is there anything im doing wrong rofl?
my config:
linters-settings:
lll:
line-length: 130
linters:
enable-all: true
disable:
- testpackage
- forbidigo
- paralleltest
- errcheck
- exhaustivestruct