committed
committed copied to clipboard
fix: Ignore comments in commit file
The linted file can contain comments, especially when commit message templates are used, which lead to comments being linted as a message, not the message used by git.
Closes: https://github.com/crate-ci/committed/issues/454
Pull Request Test Coverage Report for Build 19506789664
Details
- 14 of 15 (93.33%) changed or added relevant lines in 1 file are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+1.8%) to 12.059%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| crates/committed/src/main.rs | 14 | 15 | 93.33% |
| <!-- | Total: | 14 | 15 |
| Totals | |
|---|---|
| Change from base Build 19044465147: | 1.8% |
| Covered Lines: | 65 |
| Relevant Lines: | 539 |
💛 - Coveralls
I'm not really happy with what I came up with, I'll take another look tomorrow.
Maybe it's best to remove trim_commit_file, after a round of take_while and filter to strip comments there is not much left to do.
Thanks!