RequireThis: enabled

This commit is contained in:
Paul Campbell 2016-09-09 20:56:37 +01:00
parent b1ddcc94dc
commit 4727f4faa5
2 changed files with 8 additions and 7 deletions

View file

@ -240,7 +240,7 @@ You need to include `checkstyle` as the version bundled with the `maven-checksty
* [RegexpSingleline](#regexpsingleline) - checkstyle - disabled
* [RegexpSinglelineJava](#regexpsinglelinejava) - checkstyle - disabled
* [RequiredParameterForAnnotation](#requiredparameterforannotation) - sevntu - disabled
* [RequireThis](#requirethis) - checkstyle - disabled
* [RequireThis](#requirethis) - checkstyle - enabled
* [ReturnBooleanFromTernary](#returnbooleanfromternary) - sevntu - enabled
* [ReturnCount](#returncount) - checkstyle - enabled
* [ReturnCountExtended](#returncountextended) - sevntu - disabled
@ -1840,6 +1840,10 @@ Checks for redundant modifiers. Checks for:
* Class constructors.
* Nested enum definitions that are declared as static.
#### [RequireThis](http://checkstyle.sourceforge.net/config_coding.html#RequireThis)
Checks that references to instance fields where a parameter name overlaps are qualified by `this.`.
#### [ReturnCount](http://checkstyle.sourceforge.net/config_coding.html#ReturnCount)
Restricts methods to have at most 2 `return` statements in non-void methods, and at most 1 in void methods.
@ -2766,12 +2770,6 @@ Generic rule; doesn't embody a 'quality' check.
Generic rule; doesn't embody a 'quality' check.
#### [RequireThis](http://checkstyle.sourceforge.net/config_coding.html#RequireThis)
> TODO: enable
> TODO: checkMethods = false
#### [SingleLineJavadoc](http://checkstyle.sourceforge.net/config_javadoc.html#SingleLineJavadoc)
I don't use single line javadoc blocks.

View file

@ -190,6 +190,9 @@
<module name="ParenPad"/> <!-- parentheses should have no padding spaces -->
<module name="RedundantModifier"/> <!-- checks for redundant modifies (e.g. public methods in an interface) -->
<module name="RequireThis"> <!-- references to instance fields where parameter name overlaps use this. -->
<property name="checkMethods" value="false"/>
</module>
<module name="ReturnCount"/> <!-- Restricts return statements to 2 per method (1 if return type is void) -->
<module name="RightCurly"/> <!-- placement of right curly braces ('}') for code blocks at end of line -->