Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed Jun 16, 2024
1 parent 0b6b276 commit 0da4655
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions cmd/jaeger/internal/extension/remotesampling/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ func GetSamplingStorage(

func (ext *rsExtension) Start(ctx context.Context, host component.Host) error {
if ext.cfg.File.Path != "" {
// TODO contextcheck linter complains about next line that context is not passed. It is not wrong.
//nolint
if err := ext.startFileStrategyStore(); err != nil {
if err := ext.startFileStrategyStore(ctx); err != nil {
return err

Check warning on line 111 in cmd/jaeger/internal/extension/remotesampling/extension.go

View check run for this annotation

Codecov / codecov/patch

cmd/jaeger/internal/extension/remotesampling/extension.go#L111

Added line #L111 was not covered by tests
}
}
Expand Down Expand Up @@ -152,12 +150,12 @@ func (ext *rsExtension) Shutdown(ctx context.Context) error {
return errors.Join(errs...)
}

func (ext *rsExtension) startFileStrategyStore() error {
func (ext *rsExtension) startFileStrategyStore(_ context.Context) error {
opts := static.Options{
StrategiesFile: ext.cfg.File.Path,
}

// TODO contextcheck linter complains about next line that context is not passed. It is not wrong.
// contextcheck linter complains about next line that context is not passed.
//nolint
ss, err := static.NewStrategyStore(opts, ext.telemetry.Logger)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (tp *traceProcessor) close(context.Context) error {
return nil

Check warning on line 77 in cmd/jaeger/internal/processors/adaptivesampling/processor.go

View check run for this annotation

Codecov / codecov/patch

cmd/jaeger/internal/processors/adaptivesampling/processor.go#L77

Added line #L77 was not covered by tests
}

func (tp *traceProcessor) processTraces(ctx context.Context, td ptrace.Traces) (ptrace.Traces, error) {
func (tp *traceProcessor) processTraces(_ context.Context, td ptrace.Traces) (ptrace.Traces, error) {
batches, err := otlp2jaeger.ProtoFromTraces(td)
if err != nil {
return td, fmt.Errorf("cannot transform OTLP traces to Jaeger format: %w", err)

Check warning on line 83 in cmd/jaeger/internal/processors/adaptivesampling/processor.go

View check run for this annotation

Codecov / codecov/patch

cmd/jaeger/internal/processors/adaptivesampling/processor.go#L80-L83

Added lines #L80 - L83 were not covered by tests
Expand Down

0 comments on commit 0da4655

Please sign in to comment.