-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
unparam false positive since upgrading to 1.13 #367
Comments
Hi, thank you! |
It does: $ unparam ./...
cmd/apigw-getmetrics/main_test.go:124:52: TestGetMetricsHandler$1$2 - result 1 (error) is always nil
cmd/cloudwatch-generatedemodata/main_test.go:87:88: TestGetMetricsHandler$1$2 - result 1 (error) is always nil |
Note that I've just fixed three false positive issues in unparam; please try the latest master. If there's still a bug, please open an issue. |
Thanks, @mvdan. Unfortunately, I'm still getting the above problem. I have created mvdan/unparam#37. |
For what it's worth, the upstream issue is now fixed. Grabbing the latest unparam should get rid of the false positive. |
@mastertinner unparam contains too many changes, including breaking change with an inability to select a callgraph algorithm. I can include it only into the next minor release |
@jirfag, can we create that release then? For me this is blocking because I cannot upgrade to 1.13 as long as that |
Sure, I’m planning v1.14 in 1-2 weeks. Before that I would like to make only patch-release fixes |
$ git cherry -v cc9d2fb52971 fbb59629db34 + 7362051ae01a0e35956c077c3be5505c70edd200 testdata: add more regression tests + a88ca0234e2c3732a53cd49514fb3877a5d9f1f5 properly record which methods implement interfaces + b762b0b27fa23ebbdfc31df1af4097cfd89a17f6 work properly with method wrapper functions + f59bb08c5c7429b88e0c6e2399b12e71e8d950db testdata: consistently use tabs + 46a5101c55d03117b263b4c5161e5d01353311c1 replace more callgraph code with plain SSA + 1679b9996abdc6431c2147a133e5223ebb86ea60 rewrite foo(bar()) code to work without callgraph + 71b5df77c291f8c5ead5f9ff0a69e0eebf3ae5b2 rewrite "called in return" code without callgraph + fc5b1c74f563d4f2f9ee7d91eda648fc7baebf67 check: replace last use of callgraph + 229ad68a599e2622cf9d3bb87a385b158efe736f fix a minor false negative in callExtract + fbb59629db34a0f69275bc336cc8c3a4dd9fbe5d fix up another false negative in testdata
unparam was updated |
unparam
reports false positives since upgrading to 1.13. Probably they are related to mvdan/unparam#36.Please include the following information:
golangci-lint --version
(or git commit if you don't use binary distribution)cat .golangci.yml
go version && go env
golangci-lint run -v
In this case, the function signature is given by an external package (i.e. https://github.com/aws/aws-sdk-go-v2) and cannot be changed. In my view, this is a false positive.
The text was updated successfully, but these errors were encountered: