1
1
/**
2
2
* @name Summary Statistics
3
3
* @description A table of summary statistics about a database.
4
- * @kind diagnostic
4
+ * @kind metric
5
5
* @id rust/summary/summary-statistics
6
6
* @tags summary
7
7
*/
@@ -10,31 +10,30 @@ import rust
10
10
import codeql.rust.Diagnostics
11
11
import Stats
12
12
13
- from string key , string value
13
+ from string key , int value
14
14
where
15
- key = "Elements extracted" and value = count ( Element e | not e instanceof Unextracted ) . toString ( )
15
+ key = "Elements extracted" and value = count ( Element e | not e instanceof Unextracted )
16
16
or
17
- key = "Elements unextracted" and value = count ( Unextracted e ) . toString ( )
17
+ key = "Elements unextracted" and value = count ( Unextracted e )
18
18
or
19
- key = "Extraction errors" and value = count ( ExtractionError e ) . toString ( )
19
+ key = "Extraction errors" and value = count ( ExtractionError e )
20
20
or
21
- key = "Extraction warnings" and value = count ( ExtractionWarning w ) . toString ( )
21
+ key = "Extraction warnings" and value = count ( ExtractionWarning w )
22
22
or
23
- key = "Files extracted - total" and value = count ( File f | exists ( f .getRelativePath ( ) ) ) . toString ( )
23
+ key = "Files extracted - total" and value = count ( File f | exists ( f .getRelativePath ( ) ) )
24
24
or
25
25
key = "Files extracted - with errors" and
26
26
value =
27
27
count ( File f | exists ( f .getRelativePath ( ) ) and not f instanceof SuccessfullyExtractedFile )
28
- .toString ( )
29
28
or
30
29
key = "Files extracted - without errors" and
31
- value = count ( SuccessfullyExtractedFile f | exists ( f .getRelativePath ( ) ) ) . toString ( )
30
+ value = count ( SuccessfullyExtractedFile f | exists ( f .getRelativePath ( ) ) )
32
31
or
33
- key = "Lines of code extracted" and value = getLinesOfCode ( ) . toString ( )
32
+ key = "Lines of code extracted" and value = getLinesOfCode ( )
34
33
or
35
- key = "Lines of user code extracted" and value = getLinesOfUserCode ( ) . toString ( )
34
+ key = "Lines of user code extracted" and value = getLinesOfUserCode ( )
36
35
or
37
- key = "Inconsistencies - AST" and value = getTotalAstInconsistencies ( ) . toString ( )
36
+ key = "Inconsistencies - AST" and value = getTotalAstInconsistencies ( )
38
37
or
39
- key = "Inconsistencies - CFG" and value = getTotalCfgInconsistencies ( ) . toString ( )
38
+ key = "Inconsistencies - CFG" and value = getTotalCfgInconsistencies ( )
40
39
select key , value
0 commit comments