Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/check-todos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Check for TODOs"

on:
pull_request:

jobs:
check-todos:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Scan for TODO strings
run: |
echo "Scanning codebase for TODOs..."

git grep -nE "TODO" -- . ':(exclude).github/workflows/*' > todos_found.txt || true

if [ -s todos_found.txt ]; then
echo "❌ ERROR: Found TODOs in the following files:"
echo "-------------------------------------------"

while IFS=: read -r file line content; do
echo "::error file=$file,line=$line::TODO found at $file:$line - must be resolved before merge:%0A$content"
done < todos_found.txt

echo "-------------------------------------------"
echo "Please resolve these TODOs or track them in an issue before merging."

exit 1
else
echo "✅ No TODOs found. Codebase is clean!"
exit 0
fi
3 changes: 3 additions & 0 deletions src/torchjd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@
)
return _deprecated_items[name][1]
raise AttributeError(f"module {__name__} has no attribute {name}")


# TODO: Just a stupid todo to test ci

Check failure on line 29 in src/torchjd/__init__.py

View workflow job for this annotation

GitHub Actions / check-todos

TODO found at src/torchjd/__init__.py:29 - must be resolved before merge: # TODO: Just a stupid todo to test ci
Comment thread
ValerianRey marked this conversation as resolved.
Outdated
Loading