Skip to content

Commit

Permalink
Clean up CI linting (#819)
Browse files Browse the repository at this point in the history
* Tweak golangci-lint: exclude Log statements from errcheck

* Ignore use of unbuffered os.Signal channel in tempo-cli

* Remove redundant type assertion (golangci-lint)
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

yvrhdn authored Jul 15, 2021
1 parent 3638caa commit c1ca1e0
Showing 4 changed files with 11 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .errcheck-exclude.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// the following functions will be excluded from errcheck
// https://github.com/kisielk/errcheck#excluding-functions
(github.com/go-kit/kit/log.Logger).Log
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -61,6 +61,10 @@ linters:
- interfacer
- typecheck

linters-settings:
errcheck:
exclude: ./.errcheck-exclude.txt

issues:
exclude:
- Error return value of .*log\.Logger\)\.Log\x60 is not checked
1 change: 1 addition & 0 deletions cmd/tempo-cli/cmd-list-block.go
Original file line number Diff line number Diff line change
@@ -96,6 +96,7 @@ func dumpBlock(r tempodb_backend.Reader, c tempodb_backend.Compactor, tenantID s

// Print stats on ctrl+c
c := make(chan os.Signal)
// nolint:govet
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
<-c
16 changes: 3 additions & 13 deletions modules/distributor/receiver/shim.go
Original file line number Diff line number Diff line change
@@ -102,22 +102,12 @@ func New(receiverCfg map[string]interface{}, pusher tempopb.PusherServer, multit
return nil, fmt.Errorf("receiver factory not found for type: %s", cfg.Type())
}

if factory, ok := factoryBase.(component.ReceiverFactory); ok {
receiver, err := factory.CreateTracesReceiver(ctx, params, cfg, shim)
if err != nil {
return nil, err
}

shim.receivers = append(shim.receivers, receiver)
continue
}

/*factory := factoryBase.(component.ReceiverFactoryOld)
receiver, err := factory.CreateTraceReceiver(ctx, zapLogger, cfg, converter.NewOCToInternalTraceConverter(shim))
receiver, err := factoryBase.CreateTracesReceiver(ctx, params, cfg, shim)
if err != nil {
return nil, err
}
shim.receivers = append(shim.receivers, receiver)*/

shim.receivers = append(shim.receivers, receiver)
}

shim.Service = services.NewIdleService(shim.starting, shim.stopping)

0 comments on commit c1ca1e0

Please sign in to comment.