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

Add nolintlint linter #5508

Merged
merged 1 commit into from
Jun 3, 2024
Merged
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
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ linters:
# Finds sending HTTP request without context.Context.
- noctx

# Reports ill-formed or insufficient nolint directives.
- nolintlint

# Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
- revive

Expand Down
2 changes: 0 additions & 2 deletions cmd/agent/app/reporter/grpc/reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ func TestReporter_EmitZipkinBatch(t *testing.T) {
})
defer s.Stop()
conn, err := grpc.NewClient(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()))
//nolint:staticcheck // don't care about errors
require.NoError(t, err)
defer conn.Close()

Expand Down Expand Up @@ -103,7 +102,6 @@ func TestReporter_EmitBatch(t *testing.T) {
})
defer s.Stop()
conn, err := grpc.NewClient(addr.String(), grpc.WithTransportCredentials(insecure.NewCredentials()))
//nolint:staticcheck // don't care about errors
require.NoError(t, err)
defer conn.Close()
rep := NewReporter(conn, nil, zap.NewNop())
Expand Down
1 change: 0 additions & 1 deletion cmd/jaeger/internal/extension/jaegerstorage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ type MemoryStorage struct {

func (cfg *Config) Validate() error {
emptyCfg := createDefaultConfig().(*Config)
//nolint:govet // The remoteRPCClient field in GRPC.Configuration contains error type
if reflect.DeepEqual(*cfg, *emptyCfg) {
return fmt.Errorf("%s: no storage type present in config", ID)
} else {
Expand Down
2 changes: 0 additions & 2 deletions storage/spanstore/downsampling_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func TestDownSamplingWriter_hashBytes(t *testing.T) {
}
c := NewDownsamplingWriter(&noopWriteSpanStore{}, downsamplingOptions)
h := c.sampler.hasherPool.Get().(*hasher)
//nolint:testifylint
assert.Equal(t, h.hashBytes(), h.hashBytes())
c.sampler.hasherPool.Put(h)
trace := model.TraceID{
Expand All @@ -82,7 +81,6 @@ func TestDownSamplingWriter_hashBytes(t *testing.T) {
}
_, _ = span.TraceID.MarshalTo(h.buffer)
// Same traceID should always be hashed to same uint64 in DownSamplingWriter.
//nolint:testifylint
assert.Equal(t, h.hashBytes(), h.hashBytes())
}

Expand Down
Loading