diff --git a/pmd/xdocs/howtowritearule.xml b/pmd/xdocs/howtowritearule.xml index 70c6bb21dc..6eb59775aa 100644 --- a/pmd/xdocs/howtowritearule.xml +++ b/pmd/xdocs/howtowritearule.xml @@ -14,12 +14,11 @@ Writing PMD rules is cool because you don't have to wait for us to get around to
- Ah ha! We see that the curly braces add a couple more AST elements - a Block
+ Ah ha! We see that the curly braces add a couple more AST nodes - a Block
and a BlockStatement
. So all we have
to do is write a rule to detect a WhileStatement
that
has a Statement
that's not followed by a Block
, and we've got a rule violation.
@@ -202,8 +201,8 @@ public class WhileLoopsMustUseBracesRule extends AbstractRule {
]]>
OK, well, it won't look exactly like that - you'll need to wrap - the example in a CDATA tag. But I couldn't figure out how to do that with this document getting - confused. If you know how, please let me know.
+ the example in a CDATA tag. But I couldn't figure out how to do that without Maven getting confused. + If you know how to do this, please let me know.Concise, eh? There'll be more documentation on this later - in the form of - an O'Reilly article - so for now, use the Astviewer utility - to experiment with how XPath expressions interact with the AST. Now that I've said - "XPath expression" 5 times, I'll stop. XPath expression.
+Concise, eh? Here's an article with a lot more detail.