File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,11 +12,19 @@ jobs:
1212
1313 - name : Scan for TODO strings
1414 run : |
15+ echo "Scanning codebase for TODOs..."
1516
16- if git grep -E "TODO" -- .; then
17- echo "Error: Found TODOs in the codebase. Please resolve them or create issues."
17+ git grep -nE "TODO" -- . ':(exclude).github/workflows/*' > todos_found.txt || true
18+
19+ # Check if the file is not empty
20+ if [ -s todos_found.txt ]; then
21+ echo "❌ ERROR: Found TODOs in the following files:"
22+ echo "-------------------------------------------"
23+ cat todos_found.txt
24+ echo "-------------------------------------------"
25+ echo "Please resolve these TODOs or track them in an issue before merging."
1826 exit 1
1927 else
20- echo "No TODOs found!"
28+ echo "✅ No TODOs found. Codebase is clean !"
2129 exit 0
2230 fi
You can’t perform that action at this time.
0 commit comments