open-telemetry / opentelemetry-go-contrib

Collection of extensions for OpenTelemetry-Go.
https://opentelemetry.io/
Apache License 2.0
1.07k stars 505 forks source link

Add unparam linter #5803

Closed dmathieu closed 2 days ago

dmathieu commented 4 days ago

This is the contrib counterpart of https://github.com/open-telemetry/opentelemetry-go/pull/5531, adding the unparam linter.

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 64.5%. Comparing base (114000d) to head (bfed6bd).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5803/graphs/tree.svg?width=650&height=150&src=pr&token=P6F3W9WA7Q&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5803?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #5803 +/- ## ======================================= - Coverage 64.5% 64.5% -0.1% ======================================= Files 200 200 Lines 12558 12558 ======================================= - Hits 8103 8101 -2 - Misses 4219 4220 +1 - Partials 236 237 +1 ``` | [Files](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5803?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [detectors/gcp/cloud-function.go](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5803?src=pr&el=tree&filepath=detectors%2Fgcp%2Fcloud-function.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZGV0ZWN0b3JzL2djcC9jbG91ZC1mdW5jdGlvbi5nbw==) | `100.0% <100.0%> (ø)` | | | [detectors/gcp/cloud-run.go](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5803?src=pr&el=tree&filepath=detectors%2Fgcp%2Fcloud-run.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZGV0ZWN0b3JzL2djcC9jbG91ZC1ydW4uZ28=) | `100.0% <100.0%> (ø)` | | | [samplers/aws/xray/fallback\_sampler.go](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5803?src=pr&el=tree&filepath=samplers%2Faws%2Fxray%2Ffallback_sampler.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c2FtcGxlcnMvYXdzL3hyYXkvZmFsbGJhY2tfc2FtcGxlci5nbw==) | `96.8% <100.0%> (ø)` | | | [samplers/aws/xray/internal/client.go](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5803?src=pr&el=tree&filepath=samplers%2Faws%2Fxray%2Finternal%2Fclient.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c2FtcGxlcnMvYXdzL3hyYXkvaW50ZXJuYWwvY2xpZW50Lmdv) | `80.9% <100.0%> (ø)` | | | [samplers/aws/xray/internal/manifest.go](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5803?src=pr&el=tree&filepath=samplers%2Faws%2Fxray%2Finternal%2Fmanifest.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c2FtcGxlcnMvYXdzL3hyYXkvaW50ZXJuYWwvbWFuaWZlc3QuZ28=) | `91.2% <100.0%> (ø)` | | | [samplers/aws/xray/internal/reservoir.go](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5803?src=pr&el=tree&filepath=samplers%2Faws%2Fxray%2Finternal%2Freservoir.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c2FtcGxlcnMvYXdzL3hyYXkvaW50ZXJuYWwvcmVzZXJ2b2lyLmdv) | `100.0% <100.0%> (ø)` | | | [instrgen/lib/context\_propagation.go](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5803?src=pr&el=tree&filepath=instrgen%2Flib%2Fcontext_propagation.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-aW5zdHJnZW4vbGliL2NvbnRleHRfcHJvcGFnYXRpb24uZ28=) | `0.0% <0.0%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5803/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)