TodoComment: only match against comments

This commit is contained in:
Paul Campbell 2016-09-06 18:51:49 +01:00
parent 9260b3b595
commit 497afd2c68
2 changed files with 1 additions and 3 deletions

View file

@ -1967,8 +1967,6 @@ void doSomething() throws IllegalStateException,
Checks for remaining `TODO` and `FIXME` comments left in code. Their presence indicates that the program isn't finished yet. Checks for remaining `TODO` and `FIXME` comments left in code. Their presence indicates that the program isn't finished yet.
> TODO: format = "(//\*).*((TODO)|(FIXME))" - only where in comments
#### [TrailingComment](http://checkstyle.sourceforge.net/config_misc.html#TrailingComment) #### [TrailingComment](http://checkstyle.sourceforge.net/config_misc.html#TrailingComment)
Checks for comments at the end of lines. Checks for comments at the end of lines.

View file

@ -195,7 +195,7 @@
<module name="ThrowsCount"/> <!-- Restricts throws statements to 4 --> <module name="ThrowsCount"/> <!-- Restricts throws statements to 4 -->
<module name="TodoComment"> <!-- no to do or fix me comments --> <module name="TodoComment"> <!-- no to do or fix me comments -->
<property name="format" value="(TODO)|(FIXME)"/> <property name="format" value="^(\s*\*).*((TODO)|(FIXME))"/>
</module> </module>
<module name="TrailingComment"/> <!-- no end-line comments (the irony!) --> <module name="TrailingComment"/> <!-- no end-line comments (the irony!) -->
<module name="TypecastParenPad"/> <!-- no spaces in type casting parentheses --> <module name="TypecastParenPad"/> <!-- no spaces in type casting parentheses -->