I would like to exclude generated methods like “equals”, “hashCode” and “toString” from Sonarqube analysis, but I can’t exclude the whole entity class since I’m using rich entities with behavior (DDD).
I guess this is a common use case, but I can find only documentaiton about “class exclusion” or “line exclusion”, not “method exclusion”, how can I deal with this common use case in Sonarqube/Sonarlint ?
Ideally, Sonarqube would allow to ignore annotated methods with
For example, I don’t want to fix/alter this awful generated code, I just want it to be ignored :
Sonarqube rules triggered :
But I want this method in the same class to trigger warnings if necessary :