I'm not sure if this exists or is something that would need to be added, but I ran though the documentation and source and I didn't see anything.
What I would like to be able to do is via a command line flag like
<arg>-XepOpt:ReturnValueIgnored:TypeToCheck=javax.persistence.criteria.Predicate</arg>
And have the checker throw a warning if an a type of javax.persistence.criteria.Predicate for example is returned (like already exists for java.math.BigDecimal) and not used. This is for a library where I cannot annotate the relevant methods.
Existing types: https://github.com/google/error-prone/blob/master/core/src/main/java/com/google/errorprone/bugpatterns/ReturnValueIgnored.java#L65
Example method: https://javaee.github.io/javaee-spec/javadocs/javax/persistence/criteria/CriteriaBuilder.html#equal-javax.persistence.criteria.Expression-javax.persistence.criteria.Expression-
I'm not sure if this exists or is something that would need to be added, but I ran though the documentation and source and I didn't see anything.
What I would like to be able to do is via a command line flag like
<arg>-XepOpt:ReturnValueIgnored:TypeToCheck=javax.persistence.criteria.Predicate</arg>And have the checker throw a warning if an a type of javax.persistence.criteria.Predicate for example is returned (like already exists for
java.math.BigDecimal) and not used. This is for a library where I cannot annotate the relevant methods.Existing types: https://github.com/google/error-prone/blob/master/core/src/main/java/com/google/errorprone/bugpatterns/ReturnValueIgnored.java#L65
Example method: https://javaee.github.io/javaee-spec/javadocs/javax/persistence/criteria/CriteriaBuilder.html#equal-javax.persistence.criteria.Expression-javax.persistence.criteria.Expression-