From 5890f179f81712df071666949b1ca62e82c149b7 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 11 Sep 2016 08:28:24 +0100 Subject: [PATCH] FinalLocalVariable: disable - Lombok val This check fails to recognise Lombok's val as being a final. --- README.md | 12 +++++++----- src/main/resources/net/kemitix/checkstyle.xml | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8a368ad..9690921 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/src/main/resources/net/kemitix/checkstyle.xml b/src/main/resources/net/kemitix/checkstyle.xml index 0730dfb..66fa2ab 100644 --- a/src/main/resources/net/kemitix/checkstyle.xml +++ b/src/main/resources/net/kemitix/checkstyle.xml @@ -85,7 +85,6 @@ -