-
Notifications
You must be signed in to change notification settings - Fork 671
Code deficiencies of various kinds and severities #2843
Comments
Thanks! Some of those are bugs; some not. We'll take a good look through all of them. |
The main ones that are not worth fixing are of this form:
where the usage is in endless functions and tests. |
Regarding the time.Tick leaks: staticcheck actively filters those calls to time.Tick that exist in endless functions or in package main. In the two instances that I reported here, I believe that at least the first one is an actual leak. The function can terminate (by calling Nameserver.Stop) and the API suggests that multiple instances might be started and stopped. I couldn't determine if the second match was a valid issue, but if it's only used from test code, then it is indeed not. |
The nameserver isn't stopped in ordinary running, just in tests. |
#2857 fixed most of this, with the exception of the obsolete http client used in the Docker proxy, which needs further thought. |
I ran
So the one remaining issue from before is still there. Some of the other warnings sound interesting. I believe Go's http proxy now supports WebSockets directly, which may simplify upgrading. |
Hi,
I ran staticcheck on weave at commit bec2470, filtered out benign issues and false positives and assembled the following report, grouped by category and sorted by severity in descending order. I hope this report is useful to you.
Subtle bugs/potential for wrong behaviour
Resource leaks
Potentially buggy tests
Usage of deprecated code
The text was updated successfully, but these errors were encountered: