3 ms·
>When the problem is found and fixed, I use `git diff` to find all the added debug logic I use "TODO" with a specific suffix to mark all the places in the code
by jffhn 4y ago
>When the problem is found and fixed, I use `git diff` to find all the added debug logic
I use "TODO" with a specific suffix to mark all the places in the code that are of interest for the work at hand (unfinished code, debug logs, places that might need modification, etc.), so that when I want to get a glimpse of what's left to deal with, a simple search for this mark yields all the places, and just them. Then once I think all the code to commit is ready, before doing the final diff review, I do a search for the mark and remove what's not to commit. It's much easier and safer that having to re-discover transient code through review, since you don't have to switch between review and edition for each cleanup, and you don't risk to miss some that would camouflage in a new chunk of code.