ci: skip TODO format checks for CHANGELOG.md#1790
Conversation
TODO format checks for CHANGELOG.mdTODO format checks for CHANGELOG.md
There was a problem hiding this comment.
Pull request overview
This PR modifies the TODO format checking script to exclude the auto-generated CHANGELOG.md file from TODO format validation, preventing false positives from historical commit messages that may contain TODO items in non-standard formats.
Changes:
- Updated the filter logic in
check-todo-format.shto skip TODO format checks forCHANGELOG.md
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
scripts/check-todo-format.sh
Outdated
| # Filter out the script itself and todo-format-check files from the results | ||
| SCRIPT_NAME=$(basename "$0") | ||
| INVALID_TODOS=$(echo "$INVALID_TODOS" | grep -v "$SCRIPT_NAME" | grep -v "todo-format-check.ya\?ml" || true) | ||
| INVALID_TODOS=$(echo "$INVALID_TODOS" | grep -v "$SCRIPT_NAME" | grep -vi "todo-format-check.ya\?ml" | grep -vi "changelog.md" || true) |
There was a problem hiding this comment.
The addition of the -i flag to grep -v "todo-format-check.ya\?ml" changes existing behavior by making the pattern case-insensitive. While this change may be harmless (no such files currently exist with different casing), it appears to be an unintended side effect of adding the changelog exclusion. Consider separating the grep commands to maintain the original case-sensitive behavior for the todo-format-check pattern while only using case-insensitive matching for the changelog pattern, or explicitly document this behavioral change if it's intentional.
| INVALID_TODOS=$(echo "$INVALID_TODOS" | grep -v "$SCRIPT_NAME" | grep -vi "todo-format-check.ya\?ml" | grep -vi "changelog.md" || true) | |
| INVALID_TODOS=$(echo "$INVALID_TODOS" | grep -v "$SCRIPT_NAME" | grep -v "todo-format-check.ya\?ml" | grep -vi "changelog.md" || true) |
Closes #1789