mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
C#: Add aggregated compiler and extractor message counts to extraction telemetry query
This commit is contained in:
@@ -12,6 +12,7 @@ import DatabaseQuality
|
||||
|
||||
predicate compilationInfo(string key, float value) {
|
||||
not key.matches("Compiler diagnostic count for%") and
|
||||
not key.matches("Extractor message count for group%") and
|
||||
exists(Compilation c, string infoKey, string infoValue | infoValue = c.getInfo(infoKey) |
|
||||
key = infoKey and
|
||||
value = infoValue.toFloat()
|
||||
@@ -22,6 +23,16 @@ predicate compilationInfo(string key, float value) {
|
||||
)
|
||||
}
|
||||
|
||||
predicate compilerDiagnostics(string key, int value) {
|
||||
key.matches("Compiler diagnostic count for%") and
|
||||
strictsum(Compilation c | | c.getInfo(key).toInt()) = value
|
||||
}
|
||||
|
||||
predicate extractorMessages(string key, int value) {
|
||||
key.matches("Extractor message count for group%") and
|
||||
strictsum(Compilation c | | c.getInfo(key).toInt()) = value
|
||||
}
|
||||
|
||||
predicate fileCount(string key, int value) {
|
||||
key = "Number of files" and
|
||||
value = strictcount(File f)
|
||||
@@ -140,6 +151,8 @@ from string key, float value
|
||||
where
|
||||
(
|
||||
compilationInfo(key, value) or
|
||||
compilerDiagnostics(key, value) or
|
||||
extractorMessages(key, value) or
|
||||
fileCount(key, value) or
|
||||
fileCountByExtension(key, value) or
|
||||
totalNumberOfLines(key, value) or
|
||||
|
||||
Reference in New Issue
Block a user