Skip to content
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

staticcheck issues #42

Closed
mdlayher opened this issue May 9, 2020 · 1 comment · Fixed by #44
Closed

staticcheck issues #42

mdlayher opened this issue May 9, 2020 · 1 comment · Fixed by #44

Comments

@mdlayher
Copy link
Contributor

mdlayher commented May 9, 2020

Hey @stapelberg! Hello from my Twitch stream! :)

Just ran staticcheck and noticed some issues on the repo, and wanted to let you know!

$ staticcheck ./...
cmd/dhcp4d/dhcp4d.go:390:4: this value of b is never used (SA4006)
integration/radvd/radvd_test.go:81:2: the goroutine calls T.Fatal, which must be called in the same goroutine as the test (SA2002)
        integration/radvd/radvd_test.go:83:4: call to T.Fatal
internal/dhcp4/dhcp4.go:103:14: error strings should not be capitalized (ST1005)
internal/dhcp4d/dhcp4d_test.go:115:34: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:158:52: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:166:53: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:191:53: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:230:53: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:242:53: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:249:53: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:256:53: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:282:52: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:315:54: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:328:54: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:362:54: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:411:52: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp4d/dhcp4d_test.go:455:52: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/dhcp6/dhcp6.go:171:15: error strings should not be capitalized (ST1005)
internal/dns/dns.go:330:5: error var sentinelEmpty should have name of the form errFoo (ST1012)
internal/dns/dns_test.go:415:62: use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
internal/netconfig/netconfig.go:240:2: this value of err is never used (SA4006)
internal/radvd/radvd.go:266:14: icmp.DefaultMessageBody is deprecated: Use RawBody instead.  (SA1019)
internal/testing/dnsmasq/dnsmasq.go:112:2: the goroutine calls T.Fatalf, which must be called in the same goroutine as the test (SA2002)
        internal/testing/dnsmasq/dnsmasq.go:119:4: call to T.Fatalf

I will take a look and fix up a few of these at a time too!

@stapelberg
Copy link
Contributor

Hey! Cool! Thank you! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants