-
Notifications
You must be signed in to change notification settings - Fork 16
ci: check TODOs #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
ci: check TODOs #514
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
855ca2d
ci: check TODOs
PierreQuinton ef9d821
make the action print the TODO lines
PierreQuinton 0ad0a3c
add TODO to make the testing fail
PierreQuinton 24d56d6
add message in the file changed tab of Github.
PierreQuinton 129c546
quick fix
PierreQuinton 7569469
improve message
PierreQuinton bfc0055
fix line skip
PierreQuinton 59ef6b8
improve message
PierreQuinton 760fe9e
improve message
PierreQuinton d826990
Merge branch 'main' into check-todos
ValerianRey 47a4d8e
Merge branch 'main' into check-todos
ValerianRey 939c2b0
Merge branch 'main' into check-todos
ValerianRey a38eab7
Add file and line number in error message
ValerianRey 49fef96
Remove todo
ValerianRey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.