You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some redundant annotations are not captured under the -AwarnRedundantAnnotation flag and are instead (1) ignored or (2) have a unique error message as brought up in #928 (comment). This is well documented in the test file below:
Check for redundant annotations in the following locations
(+ means that CF correctly reports an expected warning in this location,
- means that CF doesn't report an expected warning in this location, mostly because the compiler
doesn't store all explicit annotations in the underlying TypeMirrors):
1. Field +
2. Local Variable +
3. Parameter (includes Receiver Parameter) +
4. Exception Parameter +
5. Resource Variable +
6. Return Type +
7. Enum Constant - (cannot get explicit annotations here)
8. Constructor Result - (cannot get explicit annotations here)
9. Wildcard upper bound and lower bound - (cannot get explicit annotations here)
10. Type Parameter upper bound and lower bound - (cannot get explicit annotations here)
11. Type (class, interface or Enum) - (cannot get explicit annotations here)
12. TypeCast - (cannot get explicit annotations here)
13. InstanceOf - (cannot get explicit annotations here)
14. Object Creation - (cannot get explicit annotations here)
15. Component Type - (cannot get explicit annotations here)
*/
It would be nice to have all of these cases homogenized under the redundant.anno message to (1) clean up message.properties and (2) reduce amount of redundant warnings when flag is not used.
The text was updated successfully, but these errors were encountered:
wmdietl
changed the title
Moving all redundant annotation warnings to -AwarnRedundantAnnotations
Move all redundant annotation warnings to -AwarnRedundantAnnotationsNov 7, 2024
Nice suggestion!
Instead of just using redundant.anno we could use that as common prefix and then e.g. output redundant.anno.nullness.on.enum.
That will allow turning on the warnings with -AwarnRedundantAnnotations and suppressing with a specific error key.
Some redundant annotations are not captured under the -AwarnRedundantAnnotation flag and are instead (1) ignored or (2) have a unique error message as brought up in #928 (comment). This is well documented in the test file below:
checker-framework/checker/tests/nullness-warnredundantannotations/RedundantAnnotation.java
Lines 6 to 27 in 33399f9
It would be nice to have all of these cases homogenized under the
redundant.anno
message to (1) clean up message.properties and (2) reduce amount of redundant warnings when flag is not used.The text was updated successfully, but these errors were encountered: