Skip to content

Conversation

@ldez
Copy link
Contributor

@ldez ldez commented Apr 5, 2025

Improve code readability.

@codecov
Copy link

codecov bot commented Apr 5, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 80.52%. Comparing base (6b7f937) to head (39cae91).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sloglint.go 60.00% 8 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
- Coverage   83.28%   80.52%   -2.76%     
==========================================
  Files           2        2              
  Lines         329      344      +15     
==========================================
+ Hits          274      277       +3     
- Misses         43       51       +8     
- Partials       12       16       +4     

☔ 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.

@ldez
Copy link
Contributor Author

ldez commented Apr 5, 2025

This is fun: the code is the same, I just inverted the if, but the coverage thinks there are new cases.
This is a good illustration of how coverage can be tricked.

@tmzane
Copy link
Member

tmzane commented Apr 5, 2025

Yeah, coverage does not like early returns, we could easily farm it by replacing early returns with nested ifs (but we wouldn't pass code reviews then 😄).

@tmzane tmzane changed the title chore: isolate checkDiscardHandler dev: isolate checkDiscardHandler Apr 5, 2025
@tmzane tmzane merged commit c66b63f into go-simpler:main Apr 5, 2025
8 of 10 checks passed
@ldez ldez deleted the feat/isolate-discard branch April 5, 2025 11:52
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