Closed KeisukeYamashita closed 3 months ago
The recent updates enhance the commit message validation system by introducing a new rule for ensuring footers are included in messages. A dedicated module and struct for footer validation have been added, along with a test for parsing multiline commit messages. Documentation for the new rule clarifies expectations for developers, promoting best practices in commit message formatting.
Files | Change Summary |
---|---|
src/git.rs |
Added a test function test_footer_with_multiline_body_parse_commit_message to validate parsing of multiline commit messages, enhancing coverage for the parse_commit_message function. |
src/rule.rs |
Introduced a new module footers_empty and an optional field footers_empty in the Rules struct to handle footer validation. Updated the Default implementation accordingly. |
src/rule/footers_empty.rs |
Implemented the FootersEmpty struct for footer validation with methods for message generation and violation checking. Added tests for validating the rule's functionality. |
web/src/content/docs/rules/footers-empty.md |
Created documentation for the "Footers Empty" rule, detailing its purpose and providing examples of correct and incorrect commit messages. |
sequenceDiagram
participant Developer
participant CommitMessageParser
participant FooterValidator
Developer->>CommitMessageParser: Submit commit message
CommitMessageParser->>FooterValidator: Validate footers
FooterValidator-->>CommitMessageParser: Return validation result
CommitMessageParser-->>Developer: Provide feedback
🐇 In the world of commits, so neat and bright,
A rule for footers now takes flight!
With messages parsed, both long and wide,
Let no empty footer dare to hide!
So hop along, with code so fine,
For clearer commits, let our work shine! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Why
Because in some companies, the commit author attaches some links to a commit.
Summary by CodeRabbit
New Features
Documentation
Bug Fixes