Open ghost opened 4 years ago
Thanks for reporting these! To me eye, there is nothing critical in here which needs immediate attention. Please open a PR to address them if you want to :)
Current list:
internal/grouped_flags/grouped_flags_test.go:33:10: Error return value of `fs.Parse` is not checked (errcheck)
fs.Parse()
^
pkg/handler/handler.go:48:12: Error return value of `w.Write` is not checked (errcheck)
w.Write([]byte(`method not allowed`))
^
pkg/handler/handler.go:69:12: Error return value of `w.Write` is not checked (errcheck)
w.Write([]byte(`method not allowed`))
^
pkg/handler/http.go:46:10: Error return value of `w.Write` is not checked (errcheck)
w.Write([]byte(resp.Body))
^
pkg/handler/unrouted_handler.go:428:21: Error return value of `lock.Unlock` is not checked (errcheck)
defer lock.Unlock()
^
pkg/handler/unrouted_handler.go:571:20: Error return value of `lock.Unlock` is not checked (errcheck)
defer lock.Unlock()
^
pkg/handler/unrouted_handler.go:629:20: Error return value of `lock.Unlock` is not checked (errcheck)
defer lock.Unlock()
^
pkg/handler/unrouted_handler.go:1041:9: Error return value of `io.Copy` is not checked (errcheck)
io.Copy(w, src)
^
pkg/handler/patch_test.go:539:16: Error return value of `writer.Write` is not checked (errcheck)
writer.Write([]byte("hello"))
^
pkg/handler/patch_test.go:586:16: Error return value of `writer.Write` is not checked (errcheck)
writer.Write([]byte("first "))
^
pkg/handler/patch_test.go:594:16: Error return value of `writer.Write` is not checked (errcheck)
writer.Write([]byte("second "))
^
internal/e2e/e2e_test.go:63:17: Error return value of `server.Shutdown` is not checked (errcheck)
server.Shutdown()
^
internal/e2e/e2e_test.go:137:20: Error return value of `proxy.Delete` is not checked (errcheck)
defer proxy.Delete()
^
internal/e2e/e2e_test.go:141:16: Error return value of `proxy.AddToxic` is not checked (errcheck)
proxy.AddToxic("", "bandwidth", "upstream", 1, toxiproxy.Attributes{
^
internal/e2e/e2e_test.go:261:20: Error return value of `proxy.Delete` is not checked (errcheck)
defer proxy.Delete()
^
internal/e2e/e2e_test.go:266:16: Error return value of `proxy.AddToxic` is not checked (errcheck)
proxy.AddToxic("", "bandwidth", "upstream", 1, toxiproxy.Attributes{
^
internal/e2e/e2e_test.go:269:16: Error return value of `proxy.AddToxic` is not checked (errcheck)
proxy.AddToxic("", "limit_data", "upstream", 1, toxiproxy.Attributes{
^
internal/e2e/e2e_test.go:474:20: Error return value of `proxy.Delete` is not checked (errcheck)
defer proxy.Delete()
^
internal/e2e/e2e_unix_test.go:65:21: Error return value of `cmd.Process.Signal` is not checked (errcheck)
cmd.Process.Signal(os.Interrupt)
^
pkg/s3store/s3store.go:602:11: Error return value of `io.Copy` is not checked (errcheck)
io.Copy(buf, res.Body)
^
pkg/s3store/s3store.go:942:11: Error return value of `file.Seek` is not checked (errcheck)
file.Seek(0, 0)
^
pkg/s3store/s3store.go:959:37: Error return value of `store.Service.AbortMultipartUpload` is not checked (errcheck)
store.Service.AbortMultipartUpload(ctx, &s3.AbortMultipartUploadInput{
^
pkg/s3store/s3store_part_producer.go:54:24: Error return value is not checked (errcheck)
fileChunk.closeReader()
^
pkg/s3store/s3store_part_producer.go:112:12: Error return value of `file.Seek` is not checked (errcheck)
file.Seek(0, 0)
^
pkg/s3store/s3store_part_producer_test.go:52:20: Error return value is not checked (errcheck)
chunk.closeReader()
^
pkg/s3store/s3store_util_test.go:35:16: Error return value of `inputBody.Seek` is not checked (errcheck)
inputBody.Seek(0, 0)
^
pkg/s3store/s3store_util_test.go:41:17: Error return value of `expectBody.Seek` is not checked (errcheck)
expectBody.Seek(0, 0)
^
pkg/s3store/s3store_util_test.go:55:36: Error return value of `(io.Seeker).Seek` is not checked (errcheck)
m.expect.Body.(io.ReadSeeker).Seek(0, 0)
^
pkg/s3store/s3store_util_test.go:82:16: Error return value of `inputBody.Seek` is not checked (errcheck)
inputBody.Seek(0, 0)
^
pkg/s3store/s3store_util_test.go:88:17: Error return value of `expectBody.Seek` is not checked (errcheck)
expectBody.Seek(0, 0)
^
pkg/s3store/s3store_util_test.go:102:36: Error return value of `(io.Seeker).Seek` is not checked (errcheck)
m.expect.Body.(io.ReadSeeker).Seek(0, 0)
^
cmd/tusd/cli/flags.go:194:10: Error return value of `fs.Parse` is not checked (errcheck)
fs.Parse()
^
cmd/tusd/cli/composer.go:130:18: printf: non-constant format string in call to (*log.Logger).Fatalf (govet)
stderr.Fatalf(err.Error())
^
pkg/hooks/grpc/grpc.go:34:15: SA1019: grpc.Dial is deprecated: use NewClient instead. Will be supported throughout 1.x. (staticcheck)
conn, err := grpc.Dial(g.Endpoint, grpcOpts...)
Describe the bug
Code does not lint cleanly using golangci-lint. There are some small issues like missing formatting directives, errors not being checked, etc. See the end of the issue for a full report.
To Reproduce
Expected behavior
Code lints cleanly.
Setup details Please provide following details, if applicable to your situation:
Report