We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79d35f2 commit 308eef4Copy full SHA for 308eef4
.dev/githooks/commit-msg
@@ -1,9 +1,9 @@
1
#!/bin/bash
2
-shopt -s lastpipe
+# shopt -s lastpipe
3
4
scopes_file=".dev/scopes.txt"
5
-test -r $scopes_file &&
6
- scopes="($(cat "$scopes_file" | sed '/^\(#.*\|\)$/d' | sed ':a;N;s/\n/|/g;ta'))"
+test -r "$scopes_file" &&
+ scopes="($(grep -vE '^\s*(#|$)' "$scopes_file" | paste -sd '|' - ))"
7
8
head -1 "$1" | grep -Eq "^(fix|feat|enhance|docs|style|refactor|test|build|rework|release|revert)(\(${scopes:-.*}(/.+)?\))?: [A-Za-z]"
9
result=$?
0 commit comments