Skip to content

[PBM-1141] cleanup by backup type #394

[PBM-1141] cleanup by backup type

[PBM-1141] cleanup by backup type #394

GitHub Actions / golangci failed Jul 6, 2023 in 1s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (1)

cli/cli.go|162 col 26| S1039: unnecessary use of fmt.Sprintf (gosimple)

Filtered Findings (30)

pbm/config.go|225 col 13| Error return value of p.GetConfig is not checked (errcheck)
pbm/node.go|275 col 30| Error return value of cn.Disconnect is not checked (errcheck)
pbm/node.go|367 col 30| Error return value of cn.Disconnect is not checked (errcheck)
pbm/oplog/restore.go|687 col 32| Error return value of o.indexCatalog.DeleteIndexes is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx.go|109 col 22| Error return value of sess.WithTransaction is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx.go|133 col 19| Error return value of mongo.WithSession is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx.go|140 col 26| Error return value of sess.AbortTransaction is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx_phys.go|86 col 22| Error return value of sess.WithTransaction is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx_phys.go|106 col 19| Error return value of mongo.WithSession is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx_phys.go|113 col 26| Error return value of sess.AbortTransaction is not checked (errcheck)
speedt/b_test.go|10 col 19| Error return value of io.Discard.Write is not checked (errcheck)
speedt/b_test.go|16 col 19| Error return value of io.Discard.Write is not checked (errcheck)
cmd/pbm-speed-test/main.go|92 col 43| Error return value of (*go.mongodb.org/mongo-driver/mongo.Client).Disconnect is not checked (errcheck)
cmd/pbm-speed-test/main.go|118 col 42| Error return value of (*go.mongodb.org/mongo-driver/mongo.Client).Disconnect is not checked (errcheck)
cmd/pbm-speed-test/main.go|124 col 42| Error return value of pbmClient.Conn.Disconnect is not checked (errcheck)
cli/status.go|238 col 21| Error return value of rconn.Disconnect is not checked (errcheck)
cli/status.go|243 col 20| Error return value of rconn.Disconnect is not checked (errcheck)
pbm/log/log.go|329 col 19| composites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields (govet)
pbm/log/log.go|331 col 19| composites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields (govet)
pbm/log/log.go|335 col 27| composites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields (govet)
pbm/pitr/pitr.go|272 col 10| composites: github.com/percona/percona-backup-mongodb/pbm/oplog.ErrInsuffRange struct literal uses unkeyed fields (govet)
e2e-tests/cmd/pbm-test/run.go|116 col 12| composites: go.mongodb.org/mongo-driver/bson/primitive.Timestamp struct literal uses unkeyed fields (govet)
e2e-tests/cmd/pbm-test/run.go|120 col 12| composites: go.mongodb.org/mongo-driver/bson/primitive.Timestamp struct literal uses unkeyed fields (govet)
pbm/pitr_test.go|14 col 13| composites: go.mongodb.org/mongo-driver/bson/primitive.Timestamp struct literal uses unkeyed fields (govet)
speedt/speedt.go|153 col 8| composites: reflect.SliceHeader struct literal uses unkeyed fields (govet)
speedt/speedt.go|154 col 35| unsafeptr: possible misuse of reflect.SliceHeader (govet)
e2e-tests/cmd/pbm-test/run_physical.go|16 col 2| ineffectual assignment to storage (ineffassign)
cli/restore.go|9 col 2| SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
pbm/restore/physical.go|9 col 2| SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
pbm/backup/physical.go|77 col 13| SA4014: this condition occurs multiple times in this if/else if chain (staticcheck)

Annotations

Check failure on line 162 in cli/cli.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cli/cli.go#L162

S1039: unnecessary use of fmt.Sprintf (gosimple)
Raw output
cli/cli.go:162:26: S1039: unnecessary use of fmt.Sprintf (gosimple)
	cleanupCmd.Flag("type", fmt.Sprintf("Backup type filter")).Short('t').
	                        ^