commit-message-checker icon indicating copy to clipboard operation
commit-message-checker copied to clipboard

Fix regex in README

Open m-czernek opened this issue 1 year ago • 1 comments

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 .

m-czernek avatar Feb 21 '24 15:02 m-czernek

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

andy-maier avatar Jul 07 '25 10:07 andy-maier