jaegertracing / jaeger

CNCF Jaeger, a Distributed Tracing Platform
https://www.jaegertracing.io/
Apache License 2.0
20.6k stars 2.45k forks source link

golangci-lint: enable and fix thelper linter #6101

Closed mmorel-35 closed 1 month ago

mmorel-35 commented 1 month ago

Which problem is this PR solving?

Description of the changes

How was this change tested?

Checklist

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.55%. Comparing base (fe700fe) to head (109d4eb). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/agent/app/testutils/mock_grpc_collector.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6101 +/- ## ========================================== + Coverage 96.45% 96.55% +0.10% ========================================== Files 352 352 Lines 19986 20054 +68 ========================================== + Hits 19277 19364 +87 + Misses 524 510 -14 + Partials 185 180 -5 ``` | [Flag](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | Coverage Δ | | |---|---|---| | [badger_v1](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `8.37% <0.00%> (-0.06%)` | :arrow_down: | | [badger_v2](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `1.69% <0.00%> (-0.02%)` | :arrow_down: | | [cassandra-4.x-v1](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `14.48% <0.00%> (-0.10%)` | :arrow_down: | | [cassandra-4.x-v2](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `1.63% <0.00%> (-0.02%)` | :arrow_down: | | [cassandra-5.x-v1](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `14.48% <0.00%> (-0.10%)` | :arrow_down: | | [cassandra-5.x-v2](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `1.63% <0.00%> (-0.02%)` | :arrow_down: | | [elasticsearch-6.x-v1](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `19.30% <0.00%> (+0.57%)` | :arrow_up: | | [elasticsearch-7.x-v1](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `19.39% <0.00%> (+0.58%)` | :arrow_up: | | [elasticsearch-8.x-v1](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `19.61% <0.00%> (+0.63%)` | :arrow_up: | | [elasticsearch-8.x-v2](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `1.69% <0.00%> (?)` | | | [grpc_v1](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `8.73% <0.00%> (-0.06%)` | :arrow_down: | | [grpc_v2](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `6.67% <0.00%> (-0.06%)` | :arrow_down: | | [kafka-v1](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `8.94% <0.00%> (-0.06%)` | :arrow_down: | | [kafka-v2](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `1.69% <0.00%> (-0.02%)` | :arrow_down: | | [memory_v2](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `1.69% <0.00%> (-0.02%)` | :arrow_down: | | [opensearch-1.x-v1](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `19.47% <0.00%> (+0.61%)` | :arrow_up: | | [opensearch-2.x-v1](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `19.46% <0.00%> (+0.60%)` | :arrow_up: | | [opensearch-2.x-v2](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `1.68% <0.00%> (-0.02%)` | :arrow_down: | | [tailsampling-processor](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `0.48% <0.00%> (-0.01%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/jaegertracing/jaeger/pull/6101/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing) | `95.46% <87.50%> (+0.09%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jaegertracing#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

yurishkuro commented 1 month ago

I am not sure I understand why this is better. When I see an error message in the logs, it's always most useful to know the exact line number that logged it, not a line number several scopes above it. t.Helper() seems to do exactly the latter. Not to mention that I see the tests usually log the full stack on errors, so that both the helper line and the main test line are shown (perhaps it's because we use testify).