mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Add classes and predicates to StructuredLogs
This commit is contained in:
@@ -269,6 +269,31 @@ module KindPredicatesLog {
|
||||
then result = this.getPredicateName()
|
||||
else result = "<Summary event>"
|
||||
}
|
||||
|
||||
RA getRA() { result = this.getObject("ra") }
|
||||
}
|
||||
|
||||
class PipeLine extends Array {
|
||||
RA ra;
|
||||
string raReference;
|
||||
|
||||
RA getRA() { result = ra }
|
||||
|
||||
string getRAReference() { result = raReference }
|
||||
|
||||
PipeLine() { this = ra.getArray(raReference) }
|
||||
|
||||
string getLineOfRA(int n) { result = this.getString(n) }
|
||||
}
|
||||
|
||||
class RA extends Object {
|
||||
SummaryEvent evt;
|
||||
|
||||
SummaryEvent getEvent() { result = evt }
|
||||
|
||||
RA() { evt.getObject("ra") = this }
|
||||
|
||||
PipeLine getPipeLine(string name) { result = this.getArray(name) }
|
||||
}
|
||||
|
||||
class SentinelEmpty extends SummaryEvent {
|
||||
@@ -284,6 +309,17 @@ module KindPredicatesLog {
|
||||
|
||||
string getRAReference() { result = this.getString("raReference") }
|
||||
|
||||
PipeLine getPipeLine() {
|
||||
exists(SummaryEvent evt | runs.getEvent() = evt |
|
||||
result = evt.getRA().getPipeLine(pragma[only_bind_into](this.getRAReference()))
|
||||
)
|
||||
}
|
||||
|
||||
float getCount(int i, string raLine) {
|
||||
result = this.getCount(i) and
|
||||
raLine = this.getPipeLine().getLineOfRA(pragma[only_bind_into](i))
|
||||
}
|
||||
|
||||
float getCount(int i) { result = getRanked(this.getArray("counts"), i) }
|
||||
|
||||
float getDuplicationPercentage(int i) {
|
||||
|
||||
Reference in New Issue
Block a user