Skip to content

chore: enable gocritic linter#7095

Merged
MrAlias merged 17 commits intoopen-telemetry:mainfrom
mmorel-35:go-critic/enable-all
Jul 29, 2025
Merged

chore: enable gocritic linter#7095
MrAlias merged 17 commits intoopen-telemetry:mainfrom
mmorel-35:go-critic/enable-all

Conversation

@mmorel-35
Copy link
Copy Markdown
Contributor

@mmorel-35 mmorel-35 commented Jul 28, 2025

Description

Enable and fixes several rules from gocritic linter

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 95.60440% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.9%. Comparing base (8955578) to head (56aa131).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
attribute/encoder.go 66.6% 1 Missing ⚠️
exporters/otlp/otlplog/otlploghttp/client.go 50.0% 0 Missing and 1 partial ⚠️
exporters/otlp/otlpmetric/otlpmetrichttp/client.go 50.0% 0 Missing and 1 partial ⚠️
trace/tracestate.go 66.6% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #7095   +/-   ##
=====================================
  Coverage   82.9%   82.9%           
=====================================
  Files        262     262           
  Lines      24449   24460   +11     
=====================================
+ Hits       20278   20288   +10     
- Misses      3795    3796    +1     
  Partials     376     376           
Files with missing lines Coverage Δ
attribute/filter.go 100.0% <100.0%> (ø)
baggage/baggage.go 99.3% <100.0%> (ø)
exporters/otlp/otlplog/otlploggrpc/client.go 91.9% <100.0%> (ø)
exporters/otlp/otlplog/otlploggrpc/config.go 90.2% <100.0%> (ø)
exporters/otlp/otlptrace/otlptracehttp/client.go 74.5% <100.0%> (ø)
exporters/prometheus/exporter.go 85.7% <100.0%> (ø)
exporters/zipkin/model.go 99.4% <100.0%> (ø)
exporters/zipkin/zipkin.go 80.3% <100.0%> (ø)
sdk/internal/x/x.go 100.0% <100.0%> (ø)
sdk/metric/exemplar/fixed_size_reservoir.go 97.6% <100.0%> (-0.1%) ⬇️
... and 13 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mmorel-35 mmorel-35 force-pushed the go-critic/enable-all branch 20 times, most recently from 41ed127 to 68582d4 Compare July 28, 2025 18:15
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
@mmorel-35 mmorel-35 force-pushed the go-critic/enable-all branch 5 times, most recently from e9d29d6 to b15e2ac Compare July 28, 2025 20:00
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
@mmorel-35 mmorel-35 force-pushed the go-critic/enable-all branch 2 times, most recently from 4a02758 to 1bd40fb Compare July 28, 2025 20:24
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
@mmorel-35 mmorel-35 force-pushed the go-critic/enable-all branch from 1bd40fb to 27860e3 Compare July 28, 2025 20:35
@mmorel-35 mmorel-35 marked this pull request as ready for review July 28, 2025 20:40
@dmathieu dmathieu added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jul 29, 2025
Comment thread semconv/internal/v2/http.go Outdated
Comment thread semconv/internal/v2/http.go Outdated
Comment thread semconv/internal/v3/http.go Outdated
Comment thread semconv/internal/v3/http.go Outdated
Comment thread semconv/internal/v4/http.go Outdated
Comment thread semconv/internal/v4/http.go Outdated
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@MrAlias MrAlias merged commit 9823913 into open-telemetry:main Jul 29, 2025
29 of 30 checks passed
@mmorel-35 mmorel-35 deleted the go-critic/enable-all branch July 29, 2025 16:25
@MrAlias MrAlias added this to the v1.38.0 milestone Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants