C#: Fix alerts and tests.

This commit is contained in:
calum
2019-04-01 10:31:48 +01:00
committed by Calum Grant
parent 66b3df7f29
commit 2a484dc4ea
4 changed files with 10 additions and 9 deletions

View File

@@ -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 |

View File

@@ -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() }