Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
|
Really nice! Could we also make it print the file path + line where the todo is? |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
|
@claude Currently, the file name and line number is not printed. Could you add that in the actual content of the error message? |
|
Claude finished @ValerianRey's task in 47s —— View job Cannot Complete Due to Permission Restrictions
Issue FoundI've analyzed the workflow file and understand what needs to be changed. The error message needs to include the file path and line number explicitly in the message text, not just in the GitHub annotation metadata. However, I cannot modify files in the SolutionHere's the change needed in Current: echo "::error file=$file,line=$line::TODO must be resolved before merge:%0A$content"Change to: echo "::error file=$file,line=$line::TODO found at $file:$line - must be resolved before merge:%0A$content"This will make the error message show something like: The file path and line number will now be explicitly visible in the error message content itself, making it easier to locate TODOs without relying solely on the GitHub annotation. You can find more information about this limitation in the FAQ. |
|
@claude Please review this again. |
|
Claude finished @ValerianRey's task in 1m 8s —— View job Code Review
Review SummaryThe workflow implementation looks good overall with clear intent and proper execution. The file path and line numbers are now correctly included in error messages as requested. Here are my findings: ✅ Strengths
🔍 Observations & Suggestions1. Case Sensitivity (Minor)The workflow searches for
2. Regex Pattern Precision (Minor)The current pattern
Suggestion: Consider a more precise pattern to match TODO comments: git grep -nE "^\s*(//|#|/\*|\*)\s*TODO" -- . ':(exclude).github/workflows/*' > todos_found.txt || trueThis would match:
But not:
However, the current approach may be intentionally broad for maximum coverage. If so, the current implementation is fine. 3. Context in Error Messages (Enhancement)The error message format on line 24 is well-structured: echo "::error file=$file,line=$line::TODO found at $file:$line - must be resolved before merge:%0A$content"This correctly includes the location in both the annotation metadata and the visible message text. ✅ 4. Exit Code Handling (Good)The workflow properly exits with code 1 when TODOs are found and 0 when clean. ✅ 🐛 Potential IssuesNone identified - The implementation is solid for its stated purpose. 📝 Best Practices Check
Recommendations
VerdictApproved ✅ - The workflow is well-implemented and achieves its goal. The file path and line number are now correctly displayed in error messages as requested. The only suggestion is to consider whether the regex pattern should be more specific to avoid false positives, but that's a design decision rather than a bug. --- | Branch: check-todos |

The idea is to have a workflow for checking that there are no TODOs in the code (capital letters only), and then add the workflow to the required passing actions for merge in the branch protection rules.
TODOs remaining. #473The other option was to add it in the precommit hooks, but this would be annoying as we couln't have any TODOs on Github, which I think is nice.