mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
C#: Fix alerts and tests.
This commit is contained in:
@@ -23,7 +23,7 @@ compilationArguments
|
||||
compilationFiles
|
||||
| compilation | 0 | Program.cs:0:0:0:0 | Program.cs |
|
||||
compilationFolder
|
||||
| compilation | folder://compilations | compilations |
|
||||
| compilation | compilations |
|
||||
diagnosticElements
|
||||
| Program.cs:1:1:1:13 | CS8019: Unnecessary using directive. | Program.cs:1:1:1:13 | using ...; |
|
||||
| Program.cs:7:13:7:13 | CS0219: The variable 'x' is assigned but its value is never used | Program.cs:7:13:7:13 | access to local variable x |
|
||||
|
||||
@@ -13,7 +13,8 @@ query predicate diagnostics(
|
||||
query predicate compilationErrors(CompilerError e) { any() }
|
||||
|
||||
query predicate metricIsZero(Compilation compilation, int metric) {
|
||||
compilation.getMetric(metric) = 0
|
||||
compilation.getMetric(metric) = 0 and
|
||||
metric != 6 // Peak working set not implemented on Linux
|
||||
}
|
||||
|
||||
query predicate compilation(Compilation c, string f) { f = c.getDirectoryString() }
|
||||
@@ -26,6 +27,8 @@ query predicate compilationFiles(Compilation compilation, int i, File f) {
|
||||
f = compilation.getFileCompiled(i)
|
||||
}
|
||||
|
||||
query predicate compilationFolder(Compilation c, Folder f) { f = c.getFolder() }
|
||||
query predicate compilationFolder(Compilation c, string folder) {
|
||||
folder = c.getFolder().getBaseName()
|
||||
}
|
||||
|
||||
query predicate diagnosticElements(Diagnostic d, Element e) { e = d.getElement() }
|
||||
|
||||
Reference in New Issue
Block a user