Use Lombok, but use sonar warn " Remove this unused "xx" private field "

SnareQube has idea, and resolve this problem? some rule 、plugins …


I am very sorry to mention that I don’t have clear idea about what is the problem you are facing and requesting for help.

Could you try to provide a bit more details ?
What are you expecting ? what is not working ? Which versions of sonarjava and sonarqube you are using ?

Thanks to clarify this.


I’m experiencing the same issue with false positives on Lombok-annotated classes.
I have set the and in the file, but for some reason, the “Remove this unused “id” private field.” messages are still there.

I’ve found the following message in Sonar logs:
"The following classes needed for analysis were missing:



As you can see, there are also some spring classes reported to be missing, although the .jar file of my application is successfully loaded before the analysis.

I’m using SonarQube version


To answer my own question - I’ve fixed the issue by including all the dependencies of my application to the build folder.
Basically, I’ve created a gradle task which copies all the .jars to /build/libs/dependencies directory, and I’ve set the in the file to point to that directory and voila!

I hope it helps.


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.