Skip to content

Conversation

@NathanBaulch
Copy link
Contributor

The latest golangci-lint version now warns against naked returns. This PR fixes those and also removes unnecessary named return parameters in a few places. IMO named parameters should only be used on functions that use recover() and functions that have > 2 non-obvious return values.

@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

❌ Patch coverage is 93.75000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.32%. Comparing base (21a523d) to head (161b837).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
slice.go 91.66% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #682   +/-   ##
=======================================
  Coverage   94.31%   94.32%           
=======================================
  Files          18       18           
  Lines        3362     3367    +5     
=======================================
+ Hits         3171     3176    +5     
  Misses        176      176           
  Partials       15       15           
Flag Coverage Δ
unittests 94.32% <93.75%> (+<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.

@NathanBaulch NathanBaulch force-pushed the lintfix branch 2 times, most recently from 4abf851 to 75a91b3 Compare September 25, 2025 00:16
@NathanBaulch
Copy link
Contributor Author

This also restores golangci-lint to latest version, as discussed in #671.

@NathanBaulch
Copy link
Contributor Author

#666 introduced quite a few linting issues. Shouldn't all PR checks be passing before a PR is merged?

@samber
Copy link
Owner

samber commented Sep 25, 2025

Thanks for your changes.

@samber samber merged commit 52d31f7 into samber:master Sep 25, 2025
10 of 11 checks passed
@NathanBaulch NathanBaulch deleted the lintfix branch September 25, 2025 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants