Skip to content

Conversation

@sruehl
Copy link
Contributor

@sruehl sruehl commented Nov 7, 2025

This PR fixes the lint errors (https://github.com/samber/oops/actions/runs/19001723492/job/54269364633) on main by utilizing a strings.Builder for the verbose format

@samber
Copy link
Owner

samber commented Nov 7, 2025

still 1 linting error

@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 75.75758% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.05%. Comparing base (1af4878) to head (bde1253).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
error.go 84.00% 4 Missing ⚠️
stacktrace.go 50.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
- Coverage   85.20%   85.05%   -0.16%     
==========================================
  Files          13       13              
  Lines         933      937       +4     
==========================================
+ Hits          795      797       +2     
- Misses        113      115       +2     
  Partials       25       25              
Flag Coverage Δ
unittests 85.05% <75.75%> (-0.16%) ⬇️

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.

str += "\n"
if str.Len() != 0 {
tmpStr := str.String()
if tmpStr[len(tmpStr)-1] != '\n' {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I replaced strings.Suffix with this for performance reasons, but looking at the implementation it is not terrible. With this we only safe one len call now

@sruehl
Copy link
Contributor Author

sruehl commented Nov 7, 2025

I did a local install of golangci-lint and get 0 issues. So should be fine now. Also not sure if you need to re-approve the workflow because I used a force-push.

@samber samber merged commit 5481e50 into samber:main Nov 7, 2025
7 checks passed
@sruehl sruehl deleted the fix/stringConcat branch November 7, 2025 14:53
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