Recently code containing a debugging override was release to production. The code was clearly marked
// TODO - Remove before releasing to production
I'm using maven checkstyle plugin:
org.apache.maven.plugins
maven-checkstyle-plugin
2.15
validate
validate
src/main/resources/config/checkstyle.xml
UTF-8
true
false
false
check
The configuration file should contain a TodoComment module This will prevent from building a code with "TODO" comments inside. You can configure it so that it looks at other comment regexps, like "FIXME" or something. Here you have more details.