Skip to content

Commit e56b515

Browse files
ci: check TODOs (#514)
1 parent 741129d commit e56b515

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/check-todos.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Check for TODOs"
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
check-todos:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
13+
- name: Scan for TODO strings
14+
run: |
15+
echo "Scanning codebase for TODOs..."
16+
17+
git grep -nE "TODO" -- . ':(exclude).github/workflows/*' > todos_found.txt || true
18+
19+
if [ -s todos_found.txt ]; then
20+
echo "❌ ERROR: Found TODOs in the following files:"
21+
echo "-------------------------------------------"
22+
23+
while IFS=: read -r file line content; do
24+
echo "::error file=$file,line=$line::TODO found at $file:$line - must be resolved before merge:%0A$content"
25+
done < todos_found.txt
26+
27+
echo "-------------------------------------------"
28+
echo "Please resolve these TODOs or track them in an issue before merging."
29+
30+
exit 1
31+
else
32+
echo "✅ No TODOs found. Codebase is clean!"
33+
exit 0
34+
fi

0 commit comments

Comments
 (0)