committed
committed copied to clipboard
RFE: support for ignoring lines matching a regexp
Caveat: haven't actually used committed much at all yet, reporting/requesting this based on docs reference.
The line_length
option seems to be nice in the sense that it ignores long lines that don't contain a "break" (although I don't know what exactly that means, I hope it's just whitespace) to avoid breaking URLs and the like.
However, it would be nice to be able to ignore certain other lines even if they do contain whitespace. I've used this config with gitlint previously:
[ignore-body-lines]
regex = ^(Co-authored-by:|((Closes|Refs|See|-|\*):? )?https?://)
... to not demand splitting e.g. the following over multiple lines / not complain about the line length. Some of these would break functionality if split over multiple lines, for others it would just feel awkward.
Co-authored-by: [email protected]
Closes: https://example.com/long-long-url
See https://example.com/long-long-url
- https://example.com/long-long-url-in-a-bulleted-list-in-commit-message
* https://example.com/long-long-url-in-another-type-of-bulleted-list-in-commit-message