Closed palsivertsen closed 2 years ago
This is probably related to https://github.com/blizzy78/varnamelen/issues/10#issuecomment-1030751753, in that range returns multiple-values.
Yes, probably.
I did a test using v0.6.1
and it's still a problem:
$ varnamelen -ignoreDecls "i int" ./...
/tmp/tmp.2OkqA0HPDD/main.go:4:6: variable name 'i' is too short for the scope of its usage
varnamelen v0.7.0 contains improvements to the way the types of idents are inferred, so this should work now.
Confirmed. Thank you!
Given this main.go file:
And this config (golangci.yaml):
I should not get an error for main.go:4:6, but I get the following error when running
golangci-lint run
: