Skip to content

Commit 91b1cb8

Browse files
committed
C++: Some renaming
1 parent 317f43d commit 91b1cb8

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

cpp/ql/src/Telemetry/Metrics.qll

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ module CppMetrics {
130130
override int getValue() { result = count(Call c) }
131131
}
132132

133-
class SucceededCalls extends SuccessMetric {
134-
SucceededCalls() { this = "calls with a target" }
133+
class CallsWithExplicitTarget extends SuccessMetric {
134+
CallsWithExplicitTarget() { this = "calls with an explicit target" }
135135

136136
override int getValue() {
137137
result = count(Call c | not c.getTarget().getADeclarationEntry().isImplicit())
@@ -221,32 +221,32 @@ module CppMetrics {
221221
}
222222

223223
class SucceededIncludeCount extends Metric {
224-
string include_text;
224+
string includeText;
225225

226226
SucceededIncludeCount() {
227227
exists(Include i |
228-
i.getIncludeText() = include_text and
228+
i.getIncludeText() = includeText and
229229
exists(i.getFile().getRelativePath()) // Only report includes from the repo
230230
) and
231-
this = "Successfully included " + include_text
231+
this = "Successfully included " + includeText
232232
}
233233

234-
int getValue() { result = count(Include i | i.getIncludeText() = include_text) }
234+
int getValue() { result = count(Include i | i.getIncludeText() = includeText) }
235235

236-
string getIncludeText() { result = include_text }
236+
string getIncludeText() { result = includeText }
237237
}
238238

239239
class MissingIncludeCount extends Metric {
240-
string include_text;
240+
string includeText;
241241

242242
MissingIncludeCount() {
243-
exists(CannotOpenFileError e | e.getIncludedFile() = include_text) and
244-
this = "Failed to include '" + include_text + "'"
243+
exists(CannotOpenFileError e | e.getIncludedFile() = includeText) and
244+
this = "Failed to include '" + includeText + "'"
245245
}
246246

247-
int getValue() { result = count(CannotOpenFileError e | e.getIncludedFile() = include_text) }
247+
int getValue() { result = count(CannotOpenFileError e | e.getIncludedFile() = includeText) }
248248

249-
string getIncludeText() { result = include_text }
249+
string getIncludeText() { result = includeText }
250250
}
251251

252252
class CompilerErrors extends ExtractionMetric {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| Percentage of calls with a target | 50.0 |
1+
| Percentage of calls with an explicit target | 50.0 |
22
| Percentage of compilations without errors | 50.0 |
33
| Percentage of expressions with a known type | 30.0 |
44
| Percentage of functions without errors | 75.0 |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
| #include directives | 2 |
22
| calls | 2 |
3-
| calls with a target | 1 |
3+
| calls with an explicit target | 1 |
44
| compilations | 2 |
55
| compilations without errors | 1 |
66
| compiler errors | 10 |

0 commit comments

Comments
 (0)