mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
WIP: extract annotations on classes, with constant values
This commit is contained in:
committed by
Chris Smowton
parent
9fa840106f
commit
7b075c2190
@@ -249,7 +249,7 @@ private predicate filteredAnnotValue(Annotation a, Method m, Expr val) {
|
||||
|
||||
private predicate sourceAnnotValue(Annotation a, Method m, Expr val) {
|
||||
annotValue(a, m, val) and
|
||||
val.getFile().getExtension() = "java"
|
||||
val.getFile().isSourceFile()
|
||||
}
|
||||
|
||||
/** An abstract representation of language elements that can be annotated. */
|
||||
|
||||
@@ -91,7 +91,7 @@ predicate numDepends(RefType t, RefType dep, int value) {
|
||||
elem = a and usesType(a.getType(), dep)
|
||||
or
|
||||
elem = [a.getValue(_), a.getAnArrayValue(_)] and
|
||||
elem.getFile().getExtension() = "java" and
|
||||
elem.getFile().isSourceFile() and
|
||||
usesType(elem.(Expr).getType(), dep)
|
||||
)
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user