JS: Rename metrics to ResolvableCallX

This commit is contained in:
Asger F
2019-07-01 12:31:47 +01:00
parent 16e6dd12d0
commit ff4d6ece80
5 changed files with 17 additions and 17 deletions

View File

@@ -153,8 +153,8 @@ SourceNode resolvableCallback() {
/**
* A call site that can be resolved to a function in the same project.
*/
class ResolvedCall extends RelevantInvoke {
ResolvedCall() {
class ResolvableCall extends RelevantInvoke {
ResolvableCall() {
FlowSteps::calls(this, _)
or
this = resolvableCallback().getAnInvocation()
@@ -166,7 +166,7 @@ class ResolvedCall extends RelevantInvoke {
*/
class ExternalCall extends RelevantInvoke {
ExternalCall() {
not this instanceof ResolvedCall and // avoid double counting
not this instanceof ResolvableCall and // avoid double counting
(
// Call to modelled external library
this = externalNode()
@@ -190,9 +190,9 @@ class ExternalCall extends RelevantInvoke {
/**
* A call site that could not be resolved.
*/
class UnresolvedCall extends RelevantInvoke {
UnresolvedCall() {
not this instanceof ResolvedCall and
class UnresolvableCall extends RelevantInvoke {
UnresolvableCall() {
not this instanceof ResolvableCall and
not this instanceof ExternalCall
}
}

View File

@@ -5,7 +5,7 @@
* @metricType project
* @metricAggregate sum
* @tags meta
* @id js/meta/resolved-call-candidates
* @id js/meta/resolvable-call-candidates
*/
import javascript
import CallGraphQuality

View File

@@ -1,13 +1,13 @@
/**
* @name Resolved call ratio
* @name Resolvable call ratio
* @description The percentage of non-external calls that can be resolved to a target.
* @kind metric
* @metricType project
* @metricAggregate sum min max avg
* @tags meta
* @id js/meta/resolved-call-ratio
* @id js/meta/resolvable-call-ratio
*/
import javascript
import CallGraphQuality
select projectRoot(), 100.0 * count(ResolvedCall call) / (float) count(NonExternalCall call)
select projectRoot(), 100.0 * count(ResolvableCall call) / (float) count(NonExternalCall call)

View File

@@ -1,13 +1,13 @@
/**
* @name Resolved calls
* @name Resolvable calls
* @description The number of calls that could be resolved to its target.
* @kind metric
* @metricType project
* @metricAggregate sum
* @tags meta
* @id js/meta/resolved-calls
* @id js/meta/resolvable-calls
*/
import javascript
import CallGraphQuality
select projectRoot(), count(ResolvedCall call)
select projectRoot(), count(ResolvableCall call)

View File

@@ -1,13 +1,13 @@
/**
* @name Unresolved calls
* @description The number of calls that could not be resolved to its target.
* @name Unresolvable calls
* @description The number of calls that could not be resolved to a target.
* @kind metric
* @metricType project
* @metricAggregate sum
* @tags meta
* @id js/meta/unresolved-calls
* @id js/meta/unresolvable-calls
*/
import javascript
import CallGraphQuality
select projectRoot(), count(UnresolvedCall call)
select projectRoot(), count(UnresolvableCall call)