mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
JS: Rename metrics to ResolvableCallX
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user