FinalLocalVariable: enable

This commit is contained in:
Paul Campbell 2016-09-06 19:05:51 +01:00
parent 5ed44301c8
commit af2b893796
2 changed files with 6 additions and 5 deletions

View file

@ -135,7 +135,7 @@ You need to include `checkstyle` as the version bundled with the `maven-checksty
* [FileTabCharacter](#filetabcharacter) - checkstyle - enabled * [FileTabCharacter](#filetabcharacter) - checkstyle - enabled
* [FinalClass](#finalclass) - checkstyle - enabled * [FinalClass](#finalclass) - checkstyle - enabled
* [FinalizeImplementation](#finalizeimplementation) - sevntu - disabled * [FinalizeImplementation](#finalizeimplementation) - sevntu - disabled
* [FinalLocalVariable](#finallocalvariable) - checkstyle - disabled * [FinalLocalVariable](#finallocalvariable) - checkstyle - enabled
* [FinalParameters](#finalparameters) - checkstyle - enabled * [FinalParameters](#finalparameters) - checkstyle - enabled
* [ForbidAnnotation](#forbidannotation) - sevntu - disabled * [ForbidAnnotation](#forbidannotation) - sevntu - disabled
* [ForbidCCommentsInMethods](#forbidccommentsinmethods) - sevntu - enabled * [ForbidCCommentsInMethods](#forbidccommentsinmethods) - sevntu - enabled
@ -1038,6 +1038,10 @@ 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) #### [FinalParameters](http://checkstyle.sourceforge.net/config_misc.html#FinalParameters)
Parameters to a method must be `final`. Parameters to a method must be `final`.
@ -2629,10 +2633,6 @@ These checks are not enabled. Notes are included for each explaining why.
Couldn't get my IDE's (IntelliJ) code style to match. Couldn't get my IDE's (IntelliJ) code style to match.
#### [FinalLocalVariable](http://checkstyle.sourceforge.net/config_coding.html#FinalLocalVariable)
> TODO: enable
#### [Header](http://checkstyle.sourceforge.net/config_header.html#Header) #### [Header](http://checkstyle.sourceforge.net/config_header.html#Header)
> TODO: enable > TODO: enable

View file

@ -81,6 +81,7 @@
<module name="FallThrough"/> <!-- checks that each switch case fall-through is commented as such --> <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="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="FinalParameters"/> <!-- parameters that never change must be declared final -->
<module name="GenericWhitespace"/> <!-- generic tokens are spaced correctly --> <module name="GenericWhitespace"/> <!-- generic tokens are spaced correctly -->