sailr
sailr copied to clipboard
error even if the regex matches
I implemented the hook and I get an error even it matches.
[Invalid Commit Message]
------------------------
Valid types: build
ci
docs
feat
fix
perf
refactor
style
test
chore
Max length (first line): 52
Min length (first line): 1
Regex: ^[.0-9]+$|build
|ci
|docs
|feat
|fix
|perf
|refactor
|style
|test
|chore)(\(.+\))?: .{1,52}$
Actual commit message: "refactor(async): almost done"
Actual length: 29
and I also dont get it why my regex has line breaks in it
I am on windows
Same issue. The regex seems to be invalid according to https://regex101.com/, since there's an unmatched ellipsis.
- The
regexp
start or revert/merge part seem to be incorrect: sailr.sh#L60regexp="${regexp}^([Rr]evert|[Mm]erge):? )?.*$|^("
- As noted above, the closing brace between question marks
? )?
is unmatched, the expression could be improved in general - The opening brace
(
was removed in 6d047d022b74403a0c034a6f2a1695b38d7457f0@@ -48,10 +48,10 @@ function set_config_values() { - regexp="^(" + regexp="^[.0-9]+$|" - regexp="${regexp}revert: )?(\w+)(" + regexp="${regexp}^([Rr]evert|[Mm]erge):? )?.*$|^("