diff --git a/.githooks/commit-msg b/.githooks/commit-msg index 2d5a6a1..827a28d 100755 --- a/.githooks/commit-msg +++ b/.githooks/commit-msg @@ -120,6 +120,12 @@ check_prefix() { scope="${scope/!}" scope="${scope/\)}" + + if check_casing "$scope"; then + false + else + panic "[optional scope] \"$scope\" is not in correct casing ($(get_casing))"; + fi fi if check_casing "$type"; then @@ -128,11 +134,6 @@ check_prefix() { panic " \"$type\" is not in correct casing ($(get_casing))"; fi - if check_casing "$scope"; then - false - else - panic "[optional scope] \"$scope\" is not in correct casing ($(get_casing))"; - fi echo "$type $scope" }