Hello,
Using SonarQube version 9.3 (build 51899), the rule “static” base class members should not be accessed via derived types (java:S3252) raises false negative when using injected methods on classes that extends PanacheEntity and PanacheEntityBase.
@Entity
public class Person extends PanacheEntity {
...
}
// this will trigger java:S3252
List<Person> allPersons = Person.listAll();
In a mundane application, the rule fires a lot and makes using Sonar with Panache pretty painful.
Would it be possible to instruct the rule to ignore the static method calls for these specific methods (they are all annotated with @io.quarkus.panache.common.impl.GenerateBridge)
The related framework documentation can found here: Quarkus - Simplified Hibernate ORM with Panache
A simple reproducer can be found here: GitHub - gnieser/sandbox-sonar
Best Regards