checkstyle_checks.xml was extended to catch TODO and FIXME, javadoc/xdoc also updated to have more useful example

This commit is contained in:
Roman Ivanov 2015-06-27 20:47:40 -07:00
parent 4a4df13bbb
commit efb8158021
4 changed files with 10 additions and 6 deletions

View File

@ -258,7 +258,9 @@
<module name="ThrowsCount">
<property name="max" value="2"/>
</module>
<module name="TodoComment"/>
<module name="TodoComment">
<property name="format" value="(TODO)|(FIXME)" />
</module>
<module name="UncommentedMain"/>
<module name="UnnecessaryParentheses"/>
<module name="AbbreviationAsWordInName"/>

View File

@ -12,6 +12,8 @@
<suppress checks="AbbreviationAsWordInName"
files="JavaNCSSCheck.java"
lines="40"/>
<!-- illegal words are part of Javadoc -->
<suppress checks="TodoComment" files=".*TodoCommentCheck\.java"/>
<!-- Tone down the checking for test code -->
<suppress checks="EmptyBlock" files=".*[\\/]src[\\/]test[\\/]"/>

View File

@ -28,7 +28,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes;
/**
* <p>
* A check for 'TODO' comments. To check for other patterns in Java comments, set
* A check for 'TODO:' comments. To check for other patterns in Java comments, set
* property format.
* </p>
* <p>
@ -40,12 +40,12 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes;
* </pre>
* <p>
* An example of how to configure the check for comments that contain
* <code>WARNING</code> is:
* <code>TODO</code> or <code>FIXME</code>is:
* </p>
*
* <pre>
* &lt;module name="TodoComment"&gt;
* &lt;property name="format" value="WARNING"/&gt;
* &lt;property name="format" value="(TODO)|(FIXME)"/&gt;
* &lt;/module&gt;
* </pre>
* @author Oliver Burn

View File

@ -154,11 +154,11 @@
</source>
<p>
To configure the check for comments that contain <code>WARNING</code>:
To configure the check for comments that contain <code>TODO</code> and <code>FIXME</code>:
</p>
<source>
&lt;module name=&quot;TodoComment&quot;&gt;
&lt;property name=&quot;format&quot; value=&quot;WARNING&quot;/&gt;
&lt;property name=&quot;format&quot; value=&quot;(TODO)|(FIXME)&quot;/&gt;
&lt;/module&gt;
</source>
</subsection>