Skip to content

Commit ff4d6ec

Browse files
committed
JS: Rename metrics to ResolvableCallX
1 parent 16e6dd1 commit ff4d6ec

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

javascript/ql/src/meta/analysis-quality/CallGraphQuality.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ SourceNode resolvableCallback() {
153153
/**
154154
* A call site that can be resolved to a function in the same project.
155155
*/
156-
class ResolvedCall extends RelevantInvoke {
157-
ResolvedCall() {
156+
class ResolvableCall extends RelevantInvoke {
157+
ResolvableCall() {
158158
FlowSteps::calls(this, _)
159159
or
160160
this = resolvableCallback().getAnInvocation()
@@ -166,7 +166,7 @@ class ResolvedCall extends RelevantInvoke {
166166
*/
167167
class ExternalCall extends RelevantInvoke {
168168
ExternalCall() {
169-
not this instanceof ResolvedCall and // avoid double counting
169+
not this instanceof ResolvableCall and // avoid double counting
170170
(
171171
// Call to modelled external library
172172
this = externalNode()
@@ -190,9 +190,9 @@ class ExternalCall extends RelevantInvoke {
190190
/**
191191
* A call site that could not be resolved.
192192
*/
193-
class UnresolvedCall extends RelevantInvoke {
194-
UnresolvedCall() {
195-
not this instanceof ResolvedCall and
193+
class UnresolvableCall extends RelevantInvoke {
194+
UnresolvableCall() {
195+
not this instanceof ResolvableCall and
196196
not this instanceof ExternalCall
197197
}
198198
}

javascript/ql/src/meta/analysis-quality/ResolvedCallCandidates.ql renamed to javascript/ql/src/meta/analysis-quality/ResolvableCallCandidates.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @metricType project
66
* @metricAggregate sum
77
* @tags meta
8-
* @id js/meta/resolved-call-candidates
8+
* @id js/meta/resolvable-call-candidates
99
*/
1010
import javascript
1111
import CallGraphQuality

javascript/ql/src/meta/analysis-quality/ResolvedCallRatio.ql renamed to javascript/ql/src/meta/analysis-quality/ResolvableCallRatio.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
2-
* @name Resolved call ratio
2+
* @name Resolvable call ratio
33
* @description The percentage of non-external calls that can be resolved to a target.
44
* @kind metric
55
* @metricType project
66
* @metricAggregate sum min max avg
77
* @tags meta
8-
* @id js/meta/resolved-call-ratio
8+
* @id js/meta/resolvable-call-ratio
99
*/
1010
import javascript
1111
import CallGraphQuality
1212

13-
select projectRoot(), 100.0 * count(ResolvedCall call) / (float) count(NonExternalCall call)
13+
select projectRoot(), 100.0 * count(ResolvableCall call) / (float) count(NonExternalCall call)

javascript/ql/src/meta/analysis-quality/ResolvedCalls.ql renamed to javascript/ql/src/meta/analysis-quality/ResolvableCalls.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
2-
* @name Resolved calls
2+
* @name Resolvable calls
33
* @description The number of calls that could be resolved to its target.
44
* @kind metric
55
* @metricType project
66
* @metricAggregate sum
77
* @tags meta
8-
* @id js/meta/resolved-calls
8+
* @id js/meta/resolvable-calls
99
*/
1010
import javascript
1111
import CallGraphQuality
1212

13-
select projectRoot(), count(ResolvedCall call)
13+
select projectRoot(), count(ResolvableCall call)

javascript/ql/src/meta/analysis-quality/UnresolvedCalls.ql renamed to javascript/ql/src/meta/analysis-quality/UnresolvableCalls.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
2-
* @name Unresolved calls
3-
* @description The number of calls that could not be resolved to its target.
2+
* @name Unresolvable calls
3+
* @description The number of calls that could not be resolved to a target.
44
* @kind metric
55
* @metricType project
66
* @metricAggregate sum
77
* @tags meta
8-
* @id js/meta/unresolved-calls
8+
* @id js/meta/unresolvable-calls
99
*/
1010
import javascript
1111
import CallGraphQuality
1212

13-
select projectRoot(), count(UnresolvedCall call)
13+
select projectRoot(), count(UnresolvableCall call)

0 commit comments

Comments
 (0)