Skip to content

Conversation

Andrei-hub11
Copy link
Contributor

Added default cases to switch statements across the codebase to comply with new linting rules.

Changes

  • Added appropriate default cases to 15+ switch statements
  • Fixed noctx error by replacing net.Listen with (*net.ListenConfig).Listen
  • Maintained existing behavior with sensible fallbacks (no-ops, errors, or test failures)

All changes preserve original functionality while satisfying linting requirements.

Closes: #7383

Checklist

@Andrei-hub11 Andrei-hub11 requested a review from a team as a code owner July 27, 2025 02:39
@Andrei-hub11 Andrei-hub11 requested a review from pavolloffay July 27, 2025 02:39
@dosubot dosubot bot added the area/storage label Jul 27, 2025
@Andrei-hub11
Copy link
Contributor Author

Let me know if any changes are needed. I’ll be happy to adjust the PR as necessary.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign off the commit. Will probably need to add unit tests to maintain coverage.

@@ -444,6 +444,8 @@ func mergeJoinIds(left, right [][]byte) [][]byte {
case -1:
// left < right, increase left one
l++
default:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't make sense in this context. I'd rather move case 0 to default (and change the others to greater/less 0)

@yurishkuro yurishkuro added the changelog:refactoring Internal code refactoring without functional changes label Jul 27, 2025
@yurishkuro yurishkuro enabled auto-merge July 27, 2025 19:56
Copy link

codecov bot commented Jul 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.46%. Comparing base (9e93d83) to head (bed0158).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7387      +/-   ##
==========================================
- Coverage   96.46%   96.46%   -0.01%     
==========================================
  Files         375      375              
  Lines       22878    22910      +32     
==========================================
+ Hits        22070    22099      +29     
- Misses        611      613       +2     
- Partials      197      198       +1     
Flag Coverage Δ
badger_v1 9.10% <19.35%> (-0.02%) ⬇️
badger_v2 1.72% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 11.81% <0.00%> (-0.03%) ⬇️
cassandra-4.x-v2-auto 1.71% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 1.71% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 11.81% <0.00%> (-0.03%) ⬇️
cassandra-5.x-v2-auto 1.71% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 1.71% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 16.78% <6.45%> (-0.03%) ⬇️
elasticsearch-7.x-v1 16.82% <6.45%> (-0.03%) ⬇️
elasticsearch-8.x-v1 16.97% <6.45%> (-0.03%) ⬇️
elasticsearch-8.x-v2 1.72% <0.00%> (-0.10%) ⬇️
elasticsearch-9.x-v2 1.72% <0.00%> (-0.01%) ⬇️
grpc_v1 10.33% <0.00%> (-0.02%) ⬇️
grpc_v2 1.72% <0.00%> (-0.01%) ⬇️
kafka-3.x-v1 9.26% <0.00%> (-0.02%) ⬇️
kafka-3.x-v2 1.72% <0.00%> (-0.01%) ⬇️
memory_v2 1.72% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 16.87% <6.45%> (-0.03%) ⬇️
opensearch-2.x-v1 16.87% <6.45%> (-0.03%) ⬇️
opensearch-2.x-v2 1.72% <0.00%> (-0.01%) ⬇️
opensearch-3.x-v2 1.72% <0.00%> (-0.01%) ⬇️
query 1.72% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.47% <0.00%> (-0.01%) ⬇️
unittests 95.43% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

auto-merge was automatically disabled July 27, 2025 20:53

Head branch was pushed to by a user without write access

@Andrei-hub11 Andrei-hub11 requested a review from yurishkuro July 27, 2025 20:55
@yurishkuro yurishkuro enabled auto-merge July 28, 2025 18:43
…dling

Signed-off-by: Andrei-hub11 <andreirodrigues794@gmail.com>
Signed-off-by: Andrei-hub11 <andreirodrigues794@gmail.com>
auto-merge was automatically disabled July 28, 2025 22:20

Head branch was pushed to by a user without write access

@Andrei-hub11
Copy link
Contributor Author

Hi @yurishkuro

Sorry for the multiple CI failures. I've now run golangci-lint locally and confirmed all issues are resolved.
Could you please approve the GitHub Actions run once more?

@Andrei-hub11 Andrei-hub11 requested a review from yurishkuro July 28, 2025 22:26
Signed-off-by: Andrei-hub11 <andreirodrigues794@gmail.com>
@yurishkuro yurishkuro enabled auto-merge July 29, 2025 03:36
@yurishkuro yurishkuro added this pull request to the merge queue Jul 29, 2025
Merged via the queue into jaegertracing:main with commit 7e51e6c Jul 29, 2025
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage changelog:refactoring Internal code refactoring without functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[refactor]: Help upgrade golinter
2 participants