Skip to content

Fix regex in README - #103

Open
m-czernek wants to merge 1 commit into
GsActions:mainfrom
m-czernek:patch-1
Open

m-czernek wants to merge 1 commit into
GsActions:mainfrom
m-czernek:patch-1

Conversation

@m-czernek

@m-czernek m-czernek commented Feb 21, 2024 •

Copy link
Copy Markdown

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 .

@andy-maier

andy-maier commented Jul 7, 2025 •

Copy link
Copy Markdown

You probably want to allow for empty lines, so the minimum should be 0.

More importantly though, see my issue #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

@dajaklie dajaklie mentioned this pull request Jul 8, 2025
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants