On our project we have a checkstyle key word that always causes a checkstyle failure. So, you can put a comment reading //NOCHECKIN on any line and it will cause the checkstyle to fail. We add this to lines such as debug prints that we don't want to ever check in – the checkstyle failure reminds the user to delete (or revert) whatever temporary change was done.
It would be great to have this feature generalized for any type of file. If it was a feature of the IDE (similar to a breakpoint), then the user wouldn't have to modify the file in any way to prevent a dodgy bit of code being checked in – they could just place a marker. That's the broad strokes of the idea – we've found our little hack implementation of it quite useful here, and I'm sure if it were cleanly integrated with the tool it would become a handy feature for the community at large.