Skip to content
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

test: If a new commit on the current branch has a Fixes: #… line, check codebase for TODO(#…)s #599

Open
chrisbobbe opened this issue Mar 28, 2024 · 1 comment
Labels
a-tools Our own development tooling, scripts, and infrastructure
Milestone

Comments

@chrisbobbe
Copy link
Collaborator

It would be nice to have an automated check for TODO(#…)s that remain in the code when they're supposed to be deleted as part of fixing the specified issue. These might have been left in accidentally despite the issue actually being fixed properly, or they might have been missed because there was actually something important to do that wasn't done.

Can we add something in tools/check that checks all new commits on the current branch (the ones not on upstream/main) to see if any has a Fixes line, and errors if there are any corresponding TODO(#…)s still in the codebase?

@chrisbobbe chrisbobbe added the a-tools Our own development tooling, scripts, and infrastructure label Mar 28, 2024
@gnprice
Copy link
Member

gnprice commented Mar 29, 2024

Sure, seems reasonable.

The way to spell upstream/main in the script should be $(git_upstream_ref), using a helper from lib/git.sh.

Then to find "Fixes" lines, I'd take git log "$(git_upstream_ref)".. --format=%b and pipe that through an appropriate Perl one-liner, which can print just the issue number for each match.

@gnprice gnprice added this to the Post-launch milestone May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-tools Our own development tooling, scripts, and infrastructure
Projects
Status: No status
Development

No branches or pull requests

2 participants