commit-message-checker
commit-message-checker copied to clipboard
Fix regex in README
Currently, the regex in the Check Line Length step fails commits that have less than 74 characters. This regex is most likely what users want - fail for commit messages that are longer than 74 chars, but pass for commit messages that are shorter than 74 chars .
You probably want to allow for empty lines, so the minimum should be 0.
More importantly though, see my issue https://github.com/GsActions/commit-message-checker/issues/106. If the goal is to check each line for a maximum length, then the invocation needs to be:
pattern: '^(.{0,74}\n)+.{0,74}\n?$'
flags: g