Maven: Finding the Pesky Todo Javadoc Tags

The common pattern while developing code is to drop a TODO  in the code. Other tropes are FIXME, XXX markers in the code to indicate that something has to be done to connect the pieces or finish an implementation.

package test;
public Test {
     // TODO add an implementation. 
}

At some point, you lose the number, the todos, and those pesky tags are lost. I found the mvn plugin taglist finds those pesky tags.

I ran the command

mvn taglist:taglist -f fhir-parent/pom.xml -Daggregate=true

I wanted to transform the report, so I added to the module’s target’s taglist.xml.

<?xml-stylesheet type="text/xml" href="#stylesheet"?>
<!DOCTYPE catelog [
<!ATTLIST xsl:stylesheet
id ID #REQUIRED>
]>
<report>
<xsl:stylesheet id="stylesheet" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<table>
<tr>
<th>TYPE</th>
<th>FILE</th>
<th>LINE</th>
<th>Comment</th>
</tr>
<xsl:for-each select="report/tags/tag/files/file/comments/comment">
<tr>
<td><xsl:value-of select="../../../../@name"/></td>
<td><xsl:value-of select="../../@name"/></td>
<td><xsl:value-of select="lineNumber"/></td>
<td><xsl:value-of select="comment"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

When loaded in Firefox, it’ll generate a table output, and you can open an issue to address or fix the TODOs. 

I hope this helps you out. (GIST below)

Reference