Skip to content

Commit

Permalink
Issue checkstyle#6586: aligned javadoc/xdoc for SimplifyBooleanReturn
Browse files Browse the repository at this point in the history
  • Loading branch information
pbludov authored and peterdemaeyer committed Apr 28, 2019
1 parent 9929bcc commit b759d22
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
Expand Up @@ -26,15 +26,33 @@

/**
* <p>
* Checks for overly complicated boolean return statements.
* Idea shamelessly stolen from the equivalent PMD rule (pmd.sourceforge.net).
* Checks for over-complicated boolean return statements.
* For example the following code
* </p>
* <pre>
* if (valid())
* return false;
* else
* return true;
* </pre>
* <p>
* could be written as
* </p>
* <pre>
* return !valid();
* </pre>
* <p>
* The idea for this Check has been shamelessly stolen from the equivalent
* <a href="http://pmd.sourceforge.net">PMD</a> rule.
* </p>
* <p>
* An example of how to configure the check is:
* To configure the check:
* </p>
* <pre>
* &lt;module name="SimplifyBooleanReturn"/&gt;
* &lt;module name=&quot;SimplifyBooleanReturn&quot;/&gt;
* </pre>
*
* @since 3.0
*/
@StatelessCheck
public class SimplifyBooleanReturnCheck
Expand Down
Expand Up @@ -123,6 +123,7 @@ public class XdocsJavaDocsTest extends AbstractModuleTestSupport {
"RequireThis",
"RightCurly",
"SimplifyBooleanExpression",
"SimplifyBooleanReturn",
"StaticVariableName",
"StringLiteralEquality",
"SuppressWarnings",
Expand Down
2 changes: 1 addition & 1 deletion src/xdocs/config_coding.xml
Expand Up @@ -4328,8 +4328,8 @@ class C {
</section>

<section name="SimplifyBooleanReturn">
<p>Since Checkstyle 3.0</p>
<subsection name="Description" id="SimplifyBooleanReturn_Description">
<p>Since Checkstyle 3.0</p>
<p>
Checks for over-complicated boolean return statements. For example
the following code
Expand Down

0 comments on commit b759d22

Please sign in to comment.