We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76fc2b8 commit 083f8aeCopy full SHA for 083f8ae
scripts/githooks/check-todos.sh
@@ -120,7 +120,7 @@ function search_todos() {
120
121
# If the file is excluded, skip it
122
if [ "$skip" = false ] && [ -f "$file" ]; then
123
- file_todos=$(grep -nHi TODO "$file" || true)
+ file_todos=$(grep -nHiE '\bTODO\b' "$file" || true)
124
[ -n "$file_todos" ] && todos+="$file_todos\n"
125
fi
126
done
@@ -136,7 +136,7 @@ function filter_todos_with_valid_jira_ticket() {
136
137
while IFS= read -r line; do
138
# Only lines with TODO but without a valid JIRA ticket
139
- if grep -qi 'TODO' <<< "$line"; then
+ if grep -qnHiE '\bTODO\b' <<< "$line"; then
140
if ! [[ "$line" =~ $jira_regex ]]; then
141
todos_without_ticket+="$line\n"
142
0 commit comments