FinalLocalVariable: disable - Lombok val

This check fails to recognise Lombok's val as being a final.
This commit is contained in:
Paul Campbell 2016-09-11 08:28:24 +01:00
parent 52bc4ff5c3
commit 5890f179f8
2 changed files with 7 additions and 6 deletions

View file

@ -135,7 +135,7 @@ You need to include `checkstyle` as the version bundled with the `maven-checksty
* [FileTabCharacter](#filetabcharacter) - checkstyle - enabled
* [FinalClass](#finalclass) - checkstyle - enabled
* [FinalizeImplementation](#finalizeimplementation) - sevntu - disabled
* [FinalLocalVariable](#finallocalvariable) - checkstyle - enabled
* [FinalLocalVariable](#finallocalvariable) - checkstyle - disabled
* [FinalParameters](#finalparameters) - checkstyle - enabled
* [ForbidAnnotation](#forbidannotation) - sevntu - disabled
* [ForbidCCommentsInMethods](#forbidccommentsinmethods) - sevntu - enabled
@ -1044,10 +1044,6 @@ class Invalid {
}
````
#### [FinalLocalVariable](http://checkstyle.sourceforge.net/config_coding.html#FinalLocalVariable)
Checks that local variables are `final` if they are never modified after declaration.
#### [FinalParameters](http://checkstyle.sourceforge.net/config_misc.html#FinalParameters)
Parameters to a method must be `final`.
@ -2740,6 +2736,12 @@ These checks are not enabled. Notes are included for each explaining why.
Couldn't get my IDE's (IntelliJ) code style to match.
#### [FinalLocalVariable](http://checkstyle.sourceforge.net/config_coding.html#FinalLocalVariable)
Doesn't recognise Lombok's `val` as being `final`.
Checks that local variables are `final` if they are never modified after declaration.
#### [IllegalInstantiation](http://checkstyle.sourceforge.net/config_coding.html#IllegalInstantiation)
Not really suitable for a template ruleset as it requires an explicit list of classes to apply to.

View file

@ -85,7 +85,6 @@
<module name="FallThrough"/> <!-- checks that each switch case fall-through is commented as such -->
<module name="FinalClass"/> <!-- class which has only private constructors is declared as final -->
<module name="FinalLocalVariable"/> <!-- unmodified local variables are final -->
<module name="FinalParameters"/> <!-- parameters that never change must be declared final -->
<module name="GenericWhitespace"/> <!-- generic tokens are spaced correctly -->