-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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] Fix new lint issues with golangci-lint v1.56.1 #31240
Comments
To reproduce: checkout branch |
This is only a part of the failures, but there's so many i'd rather not submit a single massive PR. Related to #31240 Signed-off-by: Alex Boten <[email protected]>
Related #31240 Signed-off-by: Alex Boten <[email protected]>
Removing |
This is only a part of the failures, but there's so many i'd rather not submit a single massive PR. Related to open-telemetry#31240 Signed-off-by: Alex Boten <[email protected]>
Related open-telemetry#31240 Signed-off-by: Alex Boten <[email protected]>
**Description:** linting error with: ``` INFO [runner] linters took 1.336744316s with stages: goanalysis_metalinter: 1.334941582s opentelemetry-collector-contrib/cmd/checkapi/main.go:50:66: unused-parameter: parameter 'err' seems to be unused, consider removing or renaming it as _ (revive) err = filepath.Walk(folder, func(path string, info fs.FileInfo, err error) error { ^ ``` and: ``` INFO [runner] linters took 1.806204856s with stages: goanalysis_metalinter: 1.80522593s opentelemetry-collector-contrib/cmd/checkapi/main.go:53:18: shadow: declaration of "err" shadows declaration at line 44 (govet) relativeBase, err := filepath.Rel(folder, base) ^ ``` **Link to tracking Issue:** <Issue number if applicable> - #31240 **Testing:** <Describe what testing was performed and which tests were added.> **Documentation:** <Describe the documentation added.>
@songy23 i cannot reproduce any other linting errors, so it seems like it's solved for now |
There are still linter failures, see https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/8341482938/job/22827781178?pr=31830 |
**Description:** <Describe what has changed.> - Linting Errors: [https://productionresultssa5.blob.core.windows.net/actions-results/44e4093a-f4c1-4e35-af4f-d630ea9b8d68/workflow-job-run-071cf28a-9760-544e-287f-c0f9ae5a03a4/logs/job/job-logs.txt?rsct=text%2Fplain&se=2024-03-25T12%3A45%3A21Z&sig=fRzhKwEpzDQDQZyUYwvEY%2BhkcFWOD3IY0EeCOE47AeU%3D&sp=r&spr=https&sr=b&st=2024-03-25T12%3A35%3A16Z&sv=2021-12-02](url) - some linting errors will be fixed by #30237 **Link to tracking Issue:** <Issue number if applicable> - #31240 **Testing:** <Describe what testing was performed and which tests were added.> **Documentation:** <Describe the documentation added.>
^ the one in opampsupervisor is expected to be fixed in #30237. |
**Description:** should be the last one **Link to tracking Issue:** - #31240
@led0nk Looks like I had a typo in my previous comment. You can run
The command takes long and you'll need to run it after each fix. Here's what I got with running ^
And thanks for helping out here! |
**Description:** This PR should solve the related Issue linked below. I tried to switch to blank identifiers instead of removing function arguments, so it could be adapted later on. linting erros in following pkgs: - [x] cmd/configschema - [x] cmd/githubgen - [x] connector/datadogconnector - [x] connector/grafanacloudconnector - [x] connector/servicegraphconnector - [x] exporter/awsemfexporter - [x] exporter/awsxrayexporter - [x] exporter/clickhouseexporter - [x] exporter/datadogexporter - [x] exporter/dynatraceexporter - [x] exporter/elasticsearchexporter - [x] exporter/honeycombmarkerexporter - [x] exporter/influxdbexporter - [x] exporter/instanaexporter - [x] exporter/kafkaexporter - [x] exporter/kineticaexporter - [x] exporter/loadbalancingexporter - [x] exporter/logicmonitorexporter - [x] exporter/logzioexporter - [x] exporter/lokiexporter - [x] exporter/mezmoexporter - [x] exporter/opensearchexporter - [x] exporter/prometheusexporter - [x] exporter/signalfxexporter - [x] exporter/splunkhecexporter - [x] exporter/sumologicexporter - [x] exporter/zipkinexporter - [x] extension/jaegerremotesampling - [x] extension/oauth2clientauthextension - [x] extension/observer - [x] extension/oidcauthextension - [x] extension/sumologicextension - [x] internal/aws - [x] internal/coreinternal - [x] internal/filter - [x] internal/kubelet - [x] internal/metadataproviders - [x] internal/sharedcomponent - [x] pkg/ottl - [x] pkg/pdatautil - [x] pkg/stanza - [x] pkg/translator - [x] processor/deltatocumulativeprocessor - [x] processor/filterprocessor - [x] processor/groupbytraceprocessor - [x] processor/k8sattributesprocessor - [x] processor/logstransformprocessor - [x] processor/metricstransformprocessor - [x] processor/resourcedetectionprocessor - [x] processor/tailsamplingprocessor - [x] processor/transformprocessor - [x] receiver/awscontainerinsightreceiver - [x] receiver/chronyreceiver - [x] receiver/splunkhecreceiver - [x] receiver/sqlqueryreceiver - [x] receiver/vcenterreceiver - [x] receiver/webhookeventreceiver - [x] receiver/zookeeperreceiver **Link to tracking Issue:** - #31240 **Testing:** <Describe what testing was performed and which tests were added.> **Documentation:** <Describe the documentation added.>
hopefully this should fix the remaning errors for PR #31830 i don't get any more errors from linting |
There are more: https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/8456126125/job/23165314343?pr=31830 Seems new linter errors introduced in recent PRs :( |
Okay i fixed this with recent PRs and no more linting errors on updated renovate-branch. |
**Description:** quick fix of recent pr with linting error (for updating linter) **Link to tracking Issue:** - #31240 --------- Co-authored-by: Dmitrii Anoshin <[email protected]>
All good, cheers @led0nk |
Thank you, @led0nk! |
Component(s)
No response
Describe the issue you're reporting
The version upgrade of golangci #31216 surfaced lots of new lint errors, e.g. https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/7892240476/job/21538478567?pr=31216. Need to fix these lint errors to unblock #31216.
The text was updated successfully, but these errors were encountered: