From efb815802131562433127c3f034bc10acf9af8ff Mon Sep 17 00:00:00 2001 From: Roman Ivanov Date: Sat, 27 Jun 2015 20:47:40 -0700 Subject: [PATCH] checkstyle_checks.xml was extended to catch TODO and FIXME, javadoc/xdoc also updated to have more useful example --- config/checkstyle_checks.xml | 4 +++- config/suppressions.xml | 2 ++ .../tools/checkstyle/checks/TodoCommentCheck.java | 6 +++--- src/xdocs/config_misc.xml | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/config/checkstyle_checks.xml b/config/checkstyle_checks.xml index 1d84d9ec7..f19473933 100644 --- a/config/checkstyle_checks.xml +++ b/config/checkstyle_checks.xml @@ -258,7 +258,9 @@ - + + + diff --git a/config/suppressions.xml b/config/suppressions.xml index 878fde813..3b58c7b29 100644 --- a/config/suppressions.xml +++ b/config/suppressions.xml @@ -12,6 +12,8 @@ + + diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/TodoCommentCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TodoCommentCheck.java index 0f1d2e76c..e4cb0cf49 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/TodoCommentCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/TodoCommentCheck.java @@ -28,7 +28,7 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; /** *

- * 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. *

*

@@ -40,12 +40,12 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes; * *

* An example of how to configure the check for comments that contain - * WARNING is: + * TODO or FIXMEis: *

* *
  * <module name="TodoComment">
- *    <property name="format" value="WARNING"/>
+ *    <property name="format" value="(TODO)|(FIXME)"/>
  * </module>
  * 
* @author Oliver Burn diff --git a/src/xdocs/config_misc.xml b/src/xdocs/config_misc.xml index bab5240c8..1eb316866 100755 --- a/src/xdocs/config_misc.xml +++ b/src/xdocs/config_misc.xml @@ -154,11 +154,11 @@

- To configure the check for comments that contain WARNING: + To configure the check for comments that contain TODO and FIXME:

<module name="TodoComment"> - <property name="format" value="WARNING"/> + <property name="format" value="(TODO)|(FIXME)"/> </module>