Skip to content

Commit ef9d821

Browse files
committed
make the action print the TODO lines
1 parent 855ca2d commit ef9d821

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/check-todos.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)