From 66571b72afa5f84053b21208a1f19f5f6d0fd343 Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L. de Mello" Date: Thu, 25 Apr 2024 19:14:15 -0300 Subject: [PATCH] fix(hooks): fix commit hook scope checking --- .githooks/commit-msg | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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" }