Skip to content

Commit 083f8ae

Browse files
CCM-11345 fix todo detection for camelcase
1 parent 76fc2b8 commit 083f8ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/githooks/check-todos.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function search_todos() {
120120

121121
# If the file is excluded, skip it
122122
if [ "$skip" = false ] && [ -f "$file" ]; then
123-
file_todos=$(grep -nHi TODO "$file" || true)
123+
file_todos=$(grep -nHiE '\bTODO\b' "$file" || true)
124124
[ -n "$file_todos" ] && todos+="$file_todos\n"
125125
fi
126126
done
@@ -136,7 +136,7 @@ function filter_todos_with_valid_jira_ticket() {
136136

137137
while IFS= read -r line; do
138138
# Only lines with TODO but without a valid JIRA ticket
139-
if grep -qi 'TODO' <<< "$line"; then
139+
if grep -qnHiE '\bTODO\b' <<< "$line"; then
140140
if ! [[ "$line" =~ $jira_regex ]]; then
141141
todos_without_ticket+="$line\n"
142142
fi

0 commit comments

Comments
 (0)