diff --git a/docs/pages/pmd/rules/apex/braces.md b/docs/pages/pmd/rules/apex/braces.md index 35799ce58..7ecd2d09a 100644 --- a/docs/pages/pmd/rules/apex/braces.md +++ b/docs/pages/pmd/rules/apex/braces.md @@ -17,11 +17,9 @@ indentation is lost then it becomes difficult to separate the code being control from the rest. ``` -//ForLoopStatement -[child::ExpressionStatement] +//ForLoopStatement/BlockStatement[@CurlyBrace='false'] | -//ForEachStatement -[child::ExpressionStatement] +//ForEachStatement/BlockStatement[@CurlyBrace='false'] ``` **Example(s):** @@ -54,11 +52,9 @@ or indentation is lost then it becomes difficult to separate the code being cont from the rest. ``` -//ExpressionStatement[parent::IfBlockStatement] +//IfBlockStatement/BlockStatement[@CurlyBrace='false'][count(child::*) > 0] | -//ExpressionStatement[parent::IfElseBlockStatement] -| -//IfElseBlockStatement[parent::IfBlockStatement] +//IfElseBlockStatement/BlockStatement[@CurlyBrace='false'][count(child::*) > 0] ``` **Example(s):** @@ -93,7 +89,7 @@ formatting or indentation is lost then it becomes difficult to separate the code controlled from the rest. ``` -//IfBlockStatement/ExpressionStatement +//IfBlockStatement/BlockStatement[@CurlyBrace='false'] ``` **Example(s):** @@ -126,7 +122,7 @@ formatting or indentation is lost then it becomes difficult to separate the code controlled from the rest. ``` -//WhileLoopStatement/ExpressionStatement +//WhileLoopStatement/BlockStatement[@CurlyBrace='false'] ``` **Example(s):** diff --git a/docs/pages/pmd/rules/java.md b/docs/pages/pmd/rules/java.md index 125a9ed55..9f2019db2 100644 --- a/docs/pages/pmd/rules/java.md +++ b/docs/pages/pmd/rules/java.md @@ -92,7 +92,7 @@ List of rulesets and rules contained in each ruleset. ## Comments * [CommentContent](pmd_rules_java_comments.html#commentcontent): A rule for the politically correct... we don't want to offend anyone. -* [CommentDefaultAccessModifier](pmd_rules_java_comments.html#commentdefaultaccessmodifier): To avoid mistakes if we want that a Method, Field or Nested class have a default access modifier ... +* [CommentDefaultAccessModifier](pmd_rules_java_comments.html#commentdefaultaccessmodifier): To avoid mistakes if we want that a Method, Constructor, Field or Nested class have a default acc... * [CommentRequired](pmd_rules_java_comments.html#commentrequired): Denotes whether comments are required (or unwanted) for specific language elements. * [CommentSize](pmd_rules_java_comments.html#commentsize): Determines whether the dimensions of non-header comments found are within the specified limits. diff --git a/docs/pages/pmd/rules/java/comments.md b/docs/pages/pmd/rules/java/comments.md index 419423e79..61cae2a6e 100644 --- a/docs/pages/pmd/rules/java/comments.md +++ b/docs/pages/pmd/rules/java/comments.md @@ -36,9 +36,9 @@ A rule for the politically correct... we don't want to offend anyone. **Priority:** Medium (3) -To avoid mistakes if we want that a Method, Field or Nested class have a default access modifier - we must add a comment at the beginning of the Method, Field or Nested class. - By default the comment must be /* default */, if you want another, you have to provide a regex. +To avoid mistakes if we want that a Method, Constructor, Field or Nested class have a default access modifier + we must add a comment at the beginning of it's declaration. + By default the comment must be /* default */, if you want another, you have to provide a regexp. **This rule is defined by the following Java class:** [net.sourceforge.pmd.lang.java.rule.comments.CommentDefaultAccessModifierRule](https://github.com/pmd/pmd/blob/master/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/comments/CommentDefaultAccessModifierRule.java)