Skip to content

Commit 559f5e0

Browse files
committed
chore(validator): fix indentation mismatch between tabs and spaces
1 parent dc828d7 commit 559f5e0

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

validator.sh

+15-15
Original file line numberDiff line numberDiff line change
@@ -64,55 +64,55 @@ validate_overall_structure() {
6464

6565
elif [[ $STATE -eq $WAITING_EMPTY ]]; then
6666
if [[ $LINE != "" ]]; then
67-
echo -e "missing empty line in commit message between header and body or body and footer"
67+
echo -e "missing empty line in commit message between header and body or body and footer"
6868
exit $ERROR_STRUCTURE
6969
fi
7070
STATE="$START_TEXT"
7171

7272
elif [[ $STATE -eq $START_TEXT ]]; then
7373
if [[ $LINE = "" ]]; then
74-
echo -e "double empty line is not allowed"
74+
echo -e "double empty line is not allowed"
7575
exit $ERROR_STRUCTURE
7676
fi
7777

7878
if [[ $LINE =~ $BROKE_PATTERN ]]; then
79-
STATE="$READING_FOOTER"
79+
STATE="$READING_FOOTER"
8080
elif [[ $LINE =~ $JIRA_PATTERN ]]; then
81-
STATE="$READING_BROKEN"
82-
GLOBAL_JIRA=${BASH_REMATCH[0]}
81+
STATE="$READING_BROKEN"
82+
GLOBAL_JIRA=${BASH_REMATCH[0]}
8383
else
84-
STATE="$READING_BODY"
85-
GLOBAL_BODY=$GLOBAL_BODY$LINE$'\n'
84+
STATE="$READING_BODY"
85+
GLOBAL_BODY=$GLOBAL_BODY$LINE$'\n'
8686
fi
8787

8888
elif [[ $STATE -eq $READING_BODY ]]; then
8989
if [[ $LINE =~ $BROKE_PATTERN ]]; then
90-
echo -e "missing empty line before broke part"
90+
echo -e "missing empty line before broke part"
9191
exit $ERROR_STRUCTURE
9292
fi
9393

9494
if [[ $LINE =~ $JIRA_PATTERN ]]; then
95-
echo -e "missing empty line before JIRA reference"
95+
echo -e "missing empty line before JIRA reference"
9696
exit $ERROR_STRUCTURE
9797
fi
9898

9999
if [[ $LINE = "" ]]; then
100-
STATE=$START_TEXT
100+
STATE=$START_TEXT
101101
else
102-
GLOBAL_BODY=$GLOBAL_BODY$LINE$'\n'
102+
GLOBAL_BODY=$GLOBAL_BODY$LINE$'\n'
103103
fi
104104

105105
elif [[ $STATE -eq $READING_BROKEN ]]; then
106106
if [[ $LINE =~ $BROKE_PATTERN ]]; then
107-
STATE="$READING_FOOTER"
107+
STATE="$READING_FOOTER"
108108
else
109-
echo -e "only broken part could be after the JIRA reference"
109+
echo -e "only broken part could be after the JIRA reference"
110110
exit $ERROR_STRUCTURE
111111
fi
112112

113113
elif [[ $STATE -eq $READING_FOOTER ]]; then
114114
if [[ $LINE = "" ]]; then
115-
echo -e "no empty line allowed in broken part"
115+
echo -e "no empty line allowed in broken part"
116116
exit $ERROR_STRUCTURE
117117
fi
118118

@@ -252,7 +252,7 @@ validate_revert() {
252252
while IFS= read -r LINE ;
253253
do
254254
if [[ $LINE =~ $REVERT_COMMIT_PATTERN ]]; then
255-
REVERTED_COMMIT=${BASH_REMATCH[1]}
255+
REVERTED_COMMIT=${BASH_REMATCH[1]}
256256
fi
257257
done <<< "$BODY"
258258

0 commit comments

Comments
 (0)