-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
update github.com/golangci/golangci-lint from 1.51.1 to 1.52.2 causes issues #20424
Comments
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
Updating golangci-lint raises the following warnings: ``` integration_test.go:385:2: if-return: redundant if ...; err != nil check, just return error instead. (revive) if err := recordsWaitAndCheck(func() (recordsCheckable, as.Error) { return c.Query(queryPolicy, geoStm1) }); err != nil { return err } integration_test.go:145:2: empty-block: this block is empty, you can remove it (revive) for range chk.Results() { } scraper.go:112:36: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) func (r *aerospikeReceiver) scrape(ctx context.Context) (pmetric.Metrics, error) { ^ config.go:54:72: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint) return multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadEndpoint, err)) ^ config.go:63:71: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint) allErrs = multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadPort, err)) ^ config.go:84:78: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint) allErrs = multierr.Append(allErrs, fmt.Errorf("%w: %s", errFailedTLSLoad, err)) ``` Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Updating golangci-lint raises the following warnings: ``` factory.go:26:2: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) ctx context.Context, ^ logs.go:133:51: unused-parameter: parameter 'host' seems to be unused, consider removing or renaming it as _ (revive) func (l *logsReceiver) Start(ctx context.Context, host component.Host) error { ^ logs.go:140:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) func (l *logsReceiver) Shutdown(ctx context.Context) error { ``` Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Updating golangci-lint raises the following warnings: ``` receiver.go:42:53: unused-parameter: parameter 'host' seems to be unused, consider removing or renaming it as _ (revive) func (m *metricReceiver) Start(ctx context.Context, host component.Host) error { ^ receiver.go:49:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) func (m *metricReceiver) Shutdown(ctx context.Context) error { ``` Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Updating golangci-lint raises the following warnings: ``` integration_test.go:385:2: if-return: redundant if ...; err != nil check, just return error instead. (revive) if err := recordsWaitAndCheck(func() (recordsCheckable, as.Error) { return c.Query(queryPolicy, geoStm1) }); err != nil { return err } integration_test.go:145:2: empty-block: this block is empty, you can remove it (revive) for range chk.Results() { } scraper.go:112:36: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) func (r *aerospikeReceiver) scrape(ctx context.Context) (pmetric.Metrics, error) { ^ config.go:54:72: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint) return multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadEndpoint, err)) ^ config.go:63:71: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint) allErrs = multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadPort, err)) ^ config.go:84:78: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint) allErrs = multierr.Append(allErrs, fmt.Errorf("%w: %s", errFailedTLSLoad, err)) ``` Linked issue: #20424 Signed-off-by: Alex Boten <[email protected]>
Updating golangci-lint raises many unused-parameter errors, this is addressing some of those. Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Updating golangci-lint raises the following warnings: ``` factory.go:26:2: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) ctx context.Context, ^ logs.go:133:51: unused-parameter: parameter 'host' seems to be unused, consider removing or renaming it as _ (revive) func (l *logsReceiver) Start(ctx context.Context, host component.Host) error { ^ logs.go:140:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) func (l *logsReceiver) Shutdown(ctx context.Context) error { ``` Linked issue: #20424 Signed-off-by: Alex Boten <[email protected]>
Updating golangci-lint raises the following warnings: ``` receiver.go:42:53: unused-parameter: parameter 'host' seems to be unused, consider removing or renaming it as _ (revive) func (m *metricReceiver) Start(ctx context.Context, host component.Host) error { ^ receiver.go:49:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive) func (m *metricReceiver) Shutdown(ctx context.Context) error { ``` Linked issue: #20424 Signed-off-by: Alex Boten <[email protected]>
Updating golangci-lint raises many unused-parameter errors, this is addressing some of those. Note in some cases, the context passed into start methods wasn't used, I fixed this. Linked issue: #20424 --------- Signed-off-by: Alex Boten <[email protected]>
Linked to: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Linked issue: #20424 --------- Signed-off-by: Alex Boten <[email protected]>
Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Linked issue: #20424 Signed-off-by: Alex Boten <[email protected]>
Linked to: #20424 Signed-off-by: Alex Boten <[email protected]>
Linked issue: #20424 Signed-off-by: Alex Boten <[email protected]>
Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Linked issue: #20424 Signed-off-by: Alex Boten <[email protected]>
Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Linked issue: #20424 Signed-off-by: Alex Boten <[email protected]>
This issue could be closed? @codeboten |
Fixes open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Fixes #20424 --------- Signed-off-by: Alex Boten <[email protected]>
Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Linked issue: open-telemetry#20424 Signed-off-by: Alex Boten <[email protected]>
Fixes open-telemetry#20424 --------- Signed-off-by: Alex Boten <[email protected]>
Component(s)
Describe the issue you're reporting
This upgrades causes many lint failures. Creating a separate issue to address them.
The text was updated successfully, but these errors were encountered: