Skip to content

Commit 2351328

Browse files
committed
C++: Rename SourceFiles metric
1 parent 593dcb6 commit 2351328

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

cpp/ql/src/Telemetry/Metrics.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,20 @@ module CppMetrics {
7676
override int getValue() { result = count(Compilation c) }
7777
}
7878

79-
class SourceFiles extends BaseMetric {
80-
SourceFiles() { this = "source files" }
79+
class SourceAndHeaderFiles extends BaseMetric {
80+
SourceAndHeaderFiles() { this = "source/header files" }
8181

8282
override int getValue() { result = count(File f | f.fromSource()) }
8383
}
8484

85-
class SourceFilesWithoutErrors extends SuccessMetric {
86-
SourceFilesWithoutErrors() { this = "source files without errors" }
85+
class SourceAndHeaderFilesWithoutErrors extends SuccessMetric {
86+
SourceAndHeaderFilesWithoutErrors() { this = "source/header files without errors" }
8787

8888
override int getValue() {
8989
result = count(File f | f.fromSource() and not exists(CompilerError e | f = e.getFile()))
9090
}
9191

92-
override SourceFiles getBaseline() { any() }
92+
override SourceAndHeaderFiles getBaseline() { any() }
9393
}
9494

9595
class CompilationsWithoutErrors extends SuccessMetric {

cpp/ql/test/library-tests/extraction_errors/DatabaseQuality.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
| Percentage of functions without errors | 75.0 |
55
| Percentage of lines of code without errors | 63.1578947368421 |
66
| Percentage of non-error expressions | 30.0 |
7-
| Percentage of source files without errors | 66.66666666666667 |
7+
| Percentage of source/header files without errors | 66.66666666666667 |
88
| Percentage of successfully resolved #include directives | 100.0 |
99
| Percentage of variables with a known type | 90.0 |

cpp/ql/test/library-tests/extraction_errors/ExtractionMetrics.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
| lines of code without errors | 12 |
1313
| lines of text | 24 |
1414
| non-error expressions | 3 |
15-
| source files | 3 |
16-
| source files without errors | 2 |
15+
| source/header files | 3 |
16+
| source/header files without errors | 2 |
1717
| successfully resolved #include directives | 2 |
1818
| syntax errors | 3 |
1919
| variables | 10 |

0 commit comments

Comments
 (0)