mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C++: Rename SourceFiles metric
This commit is contained in:
@@ -76,20 +76,20 @@ module CppMetrics {
|
||||
override int getValue() { result = count(Compilation c) }
|
||||
}
|
||||
|
||||
class SourceFiles extends BaseMetric {
|
||||
SourceFiles() { this = "source files" }
|
||||
class SourceAndHeaderFiles extends BaseMetric {
|
||||
SourceAndHeaderFiles() { this = "source/header files" }
|
||||
|
||||
override int getValue() { result = count(File f | f.fromSource()) }
|
||||
}
|
||||
|
||||
class SourceFilesWithoutErrors extends SuccessMetric {
|
||||
SourceFilesWithoutErrors() { this = "source files without errors" }
|
||||
class SourceAndHeaderFilesWithoutErrors extends SuccessMetric {
|
||||
SourceAndHeaderFilesWithoutErrors() { this = "source/header files without errors" }
|
||||
|
||||
override int getValue() {
|
||||
result = count(File f | f.fromSource() and not exists(CompilerError e | f = e.getFile()))
|
||||
}
|
||||
|
||||
override SourceFiles getBaseline() { any() }
|
||||
override SourceAndHeaderFiles getBaseline() { any() }
|
||||
}
|
||||
|
||||
class CompilationsWithoutErrors extends SuccessMetric {
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
| Percentage of functions without errors | 75.0 |
|
||||
| Percentage of lines of code without errors | 63.1578947368421 |
|
||||
| Percentage of non-error expressions | 30.0 |
|
||||
| Percentage of source files without errors | 66.66666666666667 |
|
||||
| Percentage of source/header files without errors | 66.66666666666667 |
|
||||
| Percentage of successfully resolved #include directives | 100.0 |
|
||||
| Percentage of variables with a known type | 90.0 |
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
| lines of code without errors | 12 |
|
||||
| lines of text | 24 |
|
||||
| non-error expressions | 3 |
|
||||
| source files | 3 |
|
||||
| source files without errors | 2 |
|
||||
| source/header files | 3 |
|
||||
| source/header files without errors | 2 |
|
||||
| successfully resolved #include directives | 2 |
|
||||
| syntax errors | 3 |
|
||||
| variables | 10 |
|
||||
|
||||
Reference in New Issue
Block a user