test: add cases for BodyValidator leading blank line edge cases - #492
Conversation
✅ Deploy Preview for commit-check ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe PR adds ChangesBodyValidator test coverage
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #492 +/- ##
==========================================
+ Coverage 97.19% 97.36% +0.17%
==========================================
Files 12 12
Lines 1175 1175
==========================================
+ Hits 1142 1144 +2
+ Misses 33 31 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks for your PR! |
Merging this PR will improve performance by 97.16%
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|



Closes #490
Added 3 test cases to TestBodyValidator covering leading-blank-line and
whitespace-only commit messages, matching the corrected expected results
in the updated issue description.
Note: lines 556-558 in BodyValidator.validate() still show as uncovered.
I believe this branch is unreachable in practice, since _get_commit_message()
strips the message before validate() runs, a message can never have
content on the first line followed by surviving blank lines by the time
it reaches this check. Happy to look into removing that dead code in a
follow up if useful, just flagging it here for visibility.
Summary by CodeRabbit