-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Goconst ignore-calls wrong behavior on v1.55.x #4240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello, You checked the following box:
Have you tried to run goconst binary? https://github.com/golangci/golangci-lint/blob/v1.54.2/go.mod#L54 https://github.com/golangci/golangci-lint/blob/v1.55.2/go.mod#L58 |
It feels like a regression related to jgautheron/goconst#21 I recommend opening an issue on the goconst repository. |
I've tried goconst, but it doesn't have a |
It's not a golangci-lint bug, it's a goconst bug: we cannot handle the problem inside golangci-lint because it's inside the code of goconst. |
I see. Will raise a issue for them. |
Welcome
Description of the problem
I found that the goconst setting
ignore-calls
has different behavior between 1.54.2 and 1.55.2, and not work as expection on v1.55.2.My code:
There are two
request2.Header.Add()
functions to add "Authorization" headers to request.Because I turn on the
ignore-calls
, I think there wounldn't be any error. It's indeed no error on the old version of golanglint-ci v1.54.2, but the v1.55.2 reports an error:Version of golangci-lint
v1.55.2
Configuration
Go environment
go version go1.21.5 linux/amd64
Verbose output of running
Output from v1.55.2:
Output from v1.54.2:
A minimal reproducible example or link to a public repository
Validation
The text was updated successfully, but these errors were encountered: