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

Enabled structcheck linter #1219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ linters:
- maintidx
- nonamedreturns
- paralleltest
- structcheck
- testableexamples
- testpackage
- thelper
Expand Down
2 changes: 0 additions & 2 deletions internal/pool/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import (
)

type testItem struct {
v uint32
Copy link
Author

@viktormas viktormas May 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was removed because the structcheck linter wrote internal/pool/pool_test.go:22:2: "v" is unused (structcheck) v uint32


onClose func() error
onIsAlive func() bool
}
Expand Down
1 change: 0 additions & 1 deletion internal/topic/topicwriterinternal/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ type PublicMessage struct {
// partitioning at level message available by protocol, but doesn't available by current server implementation
// the field hidden from public access for prevent runtime errors.
// it will be published after implementation on server side.
futurePartitioning PublicFuturePartitioning
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was removed because the structcheck linter wrote internal/topic/topicwriterinternal/message.go:26:2: "futurePartitioning" is unused (structcheck) futurePartitioning PublicFuturePartitioning

}

// PublicFuturePartitioning will be published in feature, after server implementation completed.
Expand Down
2 changes: 0 additions & 2 deletions internal/topic/topicwriterinternal/writer_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/jonboulle/clockwork"

"github.com/ydb-platform/ydb-go-sdk/v3/credentials"
"github.com/ydb-platform/ydb-go-sdk/v3/internal/grpcwrapper/rawtopic/rawtopiccommon"
Copy link
Author

@viktormas viktormas May 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn’t remove this, but when I added it back, the development environment began to issue “unused import”.

"github.com/ydb-platform/ydb-go-sdk/v3/internal/grpcwrapper/rawtopic/rawtopicwriter"
"github.com/ydb-platform/ydb-go-sdk/v3/trace"
)
Expand All @@ -22,5 +21,4 @@ type WritersCommonConfig struct {
cred credentials.Credentials
credUpdateInterval time.Duration
clock clockwork.Clock
forceCodec rawtopiccommon.Codec
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was removed because the structcheck linter wrote internal/topic/topicwriterinternal/writer_config.go:25:2: "forceCodec" is unused (structcheck) forceCodec rawtopiccommon.Codec

}
Loading