Hi,
We’re using SonarQube 2025.1 LTA to analyze a Java project that uses Lombok. Our project is on Java 21, and we run the analysis using the SonarQube Scanner CLI.
SonarQube is reporting the issue “Remove this unused ‘name’ private field” in a class annotated with Lombok annotations (the field is actually being used through Lombok’s generated methods).
Here’s an example of the class causing the issue:
java
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Project {
private String name;
}
Are there any configurations we might be missing to properly handle Lombok-annotated fields?