mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
simplified predicates, removed overridden getFile predicate
This commit is contained in:
@@ -22,12 +22,7 @@ class AndroidManifestXmlFile extends XMLFile {
|
||||
/**
|
||||
* Holds if this Android manifest file is located in a build directory.
|
||||
*/
|
||||
predicate isInBuildDirectory() {
|
||||
exists(AndroidManifestXmlFile file |
|
||||
file = this.getFile() and
|
||||
file.getRelativePath().matches("%build%")
|
||||
)
|
||||
}
|
||||
predicate isInBuildDirectory() { this.getFile().getRelativePath().matches("%build%") }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,19 +60,7 @@ class AndroidApplicationXmlElement extends XMLElement {
|
||||
/**
|
||||
* Holds if this application element has the attribute `android:debuggable` set to `true`.
|
||||
*/
|
||||
predicate isDebuggable() {
|
||||
exists(AndroidXmlAttribute attr |
|
||||
this.getAnAttribute() = attr and
|
||||
attr.getName() = "debuggable" and
|
||||
attr.getValue() = "true"
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the getFile() predicate of the XMLElement class to get the
|
||||
* AndroidManifest.xml file itself.
|
||||
*/
|
||||
override AndroidManifestXmlFile getFile() { result = super.getFile() }
|
||||
predicate isDebuggable() { this.getAttributeValue("debuggable") = "true" }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user