Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat: support reading commit message from a file #198

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

welpo
Copy link
Owner

@welpo welpo commented Jan 17, 2025

Summary

Add support for reading commit messages from a file via a new --file flag. This allows direct input of commit messages from files as an alternative to command-line arguments or stdin.

Related issue

#179


How has this been tested?

  • Manual tests
  • Unit tests
  • Integration tests

Added comprehensive test suite in tests/lint/test_file_input.rs covering:

  • Reading valid files
  • Handling empty files
  • Processing files with comments
  • Handling multiline messages
  • Error cases

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)

Checklist

  • I have read the contributing guidelines.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code follows the code style of this project.
  • I have formatted the code with cargo fmt.
  • My change requires updating the documentation.
  • I have updated the documentation accordingly.

@welpo welpo added the enhancement New feature or request label Jan 17, 2025
@welpo welpo force-pushed the feat/read-commit-msg-from-file branch from 432507f to 9376c9c Compare January 17, 2025 20:31
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.25%. Comparing base (2550ee5) to head (9376c9c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #198   +/-   ##
=======================================
  Coverage   98.24%   98.25%           
=======================================
  Files          12       12           
  Lines        1310     1317    +7     
=======================================
+ Hits         1287     1294    +7     
  Misses         23       23           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@welpo welpo merged commit 5d00fa7 into main Jan 17, 2025
16 checks passed
@welpo welpo deleted the feat/read-commit-msg-from-file branch January 17, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant