Files
codeql/java/ql/src/Language Abuse/ImplementsAnnotation.ql
2018-10-11 11:31:37 +02:00

19 lines
525 B
Plaintext

/**
* @name Annotation is extended or implemented
* @description Extending or implementing an annotation is unlikely to be what the programmer intends.
* @kind problem
* @problem.severity warning
* @precision low
* @id java/annotation-subtype
* @tags maintainability
* correctness
* logic
*/
import java
from RefType type, AnnotationType annotation
where type.getASupertype() = annotation
select type,
"Should this class be annotated by '" + annotation.getName() + "', not have it as a super-type?"