-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EitherLogOrThrowCheck does not recognise lombock log annotations #784
Comments
Since lombok modifies the bytecode in the JVM, we have so far been against making special overrides just for it. We deal with the source code as it is. See checkstyle/checkstyle#5470 . @romani ping |
@rnveach that confirms my assumption. How about, instead of extending the check to recognise lombok / one liberty the Also thx for the issue reference. |
please share problems that run into, we do want to ease issue creation process, we appreciate feedback. checkstyle is sourcecode analyzer (not a bitecode), so it works badly with bycode generation tools. Lombok is inly one of them, if we allow lombok there will another issue to allow something else. As this is not a main checkstyle project, we have more freedom to experiments. |
/var/tmp $ cat YOUR_FILE.java
/var/tmp $ cat config.xml
The rule violation in Test.java is not reported.
I expect that checkstyle doesn't recognise the logger as he gets declared as class field at compile time by lombok.
Interestingly adding the static final log field by hand to any class of the projects helps checkstle enough too then find
EitherLogOrThrowCheck
violations in the project.PS: I really tried building a working cli example but was unable to do so.
The text was updated successfully, but these errors were encountered: