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

[chore] update linter version #22983

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
more unused params, remove copylocks lint error
Signed-off-by: Alex Boten <aboten@lightstep.com>
  • Loading branch information
Alex Boten committed May 31, 2023
commit 54fb0f8dd9e59738f26078246cc966b0743fefd5
2 changes: 1 addition & 1 deletion receiver/azuremonitorreceiver/scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (s *azureScraper) GetMetricsValuesClient() MetricsValuesClient {
return client
}

func (s *azureScraper) start(_ context.Context, host component.Host) (err error) {
func (s *azureScraper) start(_ context.Context, _ component.Host) (err error) {
s.cred, err = s.azIDCredentialsFunc(s.cfg.TenantID, s.cfg.ClientID, s.cfg.ClientSecret, nil)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion receiver/azuremonitorreceiver/scraper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ type metricsValuesClientMock struct {
lists map[string]map[string]armmonitor.MetricsClientListResponse
}

func (mvcm metricsValuesClientMock) List(ctx context.Context, resourceURI string, options *armmonitor.MetricsClientListOptions) (armmonitor.MetricsClientListResponse, error) {
func (mvcm metricsValuesClientMock) List(_ context.Context, resourceURI string, options *armmonitor.MetricsClientListOptions) (armmonitor.MetricsClientListResponse, error) {
return mvcm.lists[resourceURI][*options.Metricnames], nil
}

Expand Down
6 changes: 3 additions & 3 deletions receiver/carbonreceiver/transport/mock_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ func (m *MockReporter) OnDataReceived(ctx context.Context) context.Context {
return ctx
}

func (m *MockReporter) OnTranslationError(_ context.Context, err error) {
func (m *MockReporter) OnTranslationError(_ context.Context, _ error) {
}

func (m *MockReporter) OnMetricsProcessed(_ context.Context, numReceivedMetricPoints int, err error) {
func (m *MockReporter) OnMetricsProcessed(_ context.Context, _ int, _ error) {
m.wgMetricsProcessed.Done()
}

func (m *MockReporter) OnDebugf(_ string, args ...interface{}) {
func (m *MockReporter) OnDebugf(_ string, _ ...interface{}) {
}

// WaitAllOnMetricsProcessedCalls blocks until the number of expected calls
Expand Down
4 changes: 2 additions & 2 deletions receiver/datadogreceiver/translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ func decodeRequest(req *http.Request, dest *pb.Traces) (err error) {
func traceChunksFromSpans(spans []pb.Span) []*pb.TraceChunk {
traceChunks := []*pb.TraceChunk{}
byID := make(map[uint64][]*pb.Span)
for i, s := range spans {
byID[s.TraceID] = append(byID[s.TraceID], &spans[i])
for i := range spans {
byID[spans[i].TraceID] = append(byID[spans[i].TraceID], &spans[i])
}
for _, t := range byID {
traceChunks = append(traceChunks, &pb.TraceChunk{
Expand Down
2 changes: 1 addition & 1 deletion receiver/filereceiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (r *fileReceiver) Start(ctx context.Context, _ component.Host) error {
return nil
}

func (r *fileReceiver) Shutdown(ctx context.Context) error {
func (r *fileReceiver) Shutdown(_ context.Context) error {
if r.cancel != nil {
r.cancel()
}
Expand Down
2 changes: 1 addition & 1 deletion receiver/kubeletstatsreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func createDefaultConfig() component.Config {
}

func createMetricsReceiver(
ctx context.Context,
_ context.Context,
set receiver.CreateSettings,
baseCfg component.Config,
consumer consumer.Metrics,
Expand Down
6 changes: 3 additions & 3 deletions receiver/oracledbreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c Config) Validate() error {

host, portStr, err := net.SplitHostPort(c.Endpoint)
if err != nil {
return multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadEndpoint, err))
return multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadEndpoint, err.Error()))
}

if host == "" {
Expand All @@ -57,7 +57,7 @@ func (c Config) Validate() error {

port, err := strconv.ParseInt(portStr, 10, 32)
if err != nil {
allErrs = multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadPort, err))
allErrs = multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadPort, err.Error()))
}

if port < 0 || port > 65535 {
Expand All @@ -77,7 +77,7 @@ func (c Config) Validate() error {
}
} else {
if _, err := url.Parse(c.DataSource); err != nil {
allErrs = multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadDataSource, err))
allErrs = multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadDataSource, err.Error()))
}
}
return allErrs
Expand Down