alert("Fuck"); // DEBUG FIXME(dlitz)
This way:
- "FIXME" gets gets highlighted in my text editor
- the whitespace triggers a git warning when committing
- I can configure a pre-push hook that refuses to push commits to origin that contain "DEBUG FIXME"
- I ever do accidentally push it, it's clear that the code was just there for debugging, and that I'm the person to talk to about it.
I also use "git add -p" to do a hunk-by-hunk review of my changes before committing them.
None of this is very hard or time-consuming, and I can't remember the last time that I accidentally pushed debugging code since I started doing this.
This way:
- "FIXME" gets gets highlighted in my text editor
- the whitespace triggers a git warning when committing
- I can configure a pre-push hook that refuses to push commits to origin that contain "DEBUG FIXME"
- I ever do accidentally push it, it's clear that the code was just there for debugging, and that I'm the person to talk to about it.
I also use "git add -p" to do a hunk-by-hunk review of my changes before committing them.
None of this is very hard or time-consuming, and I can't remember the last time that I accidentally pushed debugging code since I started doing this.