File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ msg_file="$1"
2121# join types with | to form regex ORs
2222r_types=" ($( IFS=' |' ; echo " ${types[*]} " ) )"
2323# optional (scope)
24- r_scope=" (\([[:alnum:] \/-]+\))?"
24+ r_scope=" (\([[:alnum:] \/-_ ]+\))?"
2525# optional breaking change indicator and colon delimiter
2626r_delim=' !?:'
2727# subject line, body, footer
Original file line number Diff line number Diff line change @@ -113,4 +113,18 @@ echo "$pass" | grep -Eq "\[main \(root-commit\) [[:alnum:]]{7}\] test: conventio
113113
114114echo " $result "
115115
116+ echo " test underscore in scope"
117+
118+ setup
119+
120+ pass=" $( git commit -m ' test(some_component): conventional-pre-commit' ) "
121+
122+ teardown
123+
124+ echo " $pass " | grep -Eq " \[main \(root-commit\) [[:alnum:]]{7}\] test\(some_component\): conventional-pre-commit"
125+
126+ (( result += "$? " ))
127+
128+ echo " $result "
129+
116130exit " $result "
You can’t perform that action at this time.
0 commit comments