Search code examples
jenkinssonarqubetodo

SonarQube Quality Gates: TODO comments


Using SonarQube's Quality Gates, is there a possibility to count the number of TODO comments in the code so that I can make the Jenkins build fail when there are too many TODOs?


Solution

  • You should activate the rule S1135 ("TODO tags should be handled") of the Java plugin: http://nemo.sonarqube.org/coding_rules#rule_key=squid%3AS1135. It will raise issues on every occurrence of TODO comments.