Skip to content

Commit 16e6dd1

Browse files
committed
JS: Address review comments part 1
1 parent 8f4228b commit 16e6dd1

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ predicate isExternalLibrary(string name) {
8484
name = "zlib"
8585
}
8686

87+
/**
88+
* Holds if the global variable `name` is defined externally.
89+
*/
8790
predicate isExternalGlobal(string name) {
8891
exists(ExternalGlobalDecl decl |
8992
decl.getName() = name
@@ -108,7 +111,7 @@ predicate isExternalGlobal(string name) {
108111
* and callbacks, so some of these might refer to internal objects.
109112
*
110113
* Additionally, we don't recognize when a project imports another file in the
111-
* same project using it module name (e.g. import "vscode" from inside the vscode project).
114+
* same project using its module name (for example import "vscode" from inside the vscode project).
112115
*/
113116
SourceNode externalNode() {
114117
exists(string moduleName |
@@ -148,7 +151,7 @@ SourceNode resolvableCallback() {
148151
}
149152

150153
/**
151-
* Acall site that can be resolved to a function in the same project.
154+
* A call site that can be resolved to a function in the same project.
152155
*/
153156
class ResolvedCall extends RelevantInvoke {
154157
ResolvedCall() {
@@ -174,7 +177,7 @@ class ExternalCall extends RelevantInvoke {
174177
// Resolved to externs file
175178
exists(this.(InvokeNode).getACallee(1))
176179
or
177-
// Modelled as taint step but isn't from an NPM module. E.g. `substring` or `push`.
180+
// Modelled as taint step but isn't from an NPM module, for example, `substring` or `push`.
178181
exists(TaintTracking::AdditionalTaintStep step |
179182
step.step(_, this)
180183
or
@@ -185,7 +188,7 @@ class ExternalCall extends RelevantInvoke {
185188
}
186189

187190
/**
188-
* Gets a call site that could not be resolved.
191+
* A call site that could not be resolved.
189192
*/
190193
class UnresolvedCall extends RelevantInvoke {
191194
UnresolvedCall() {

javascript/ql/src/meta/analysis-quality/ResolvedCallRatio.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Resolved call ratio
3-
* @description The percentage of non-external calls that could be resolved to its target.
3+
* @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

0 commit comments

Comments
 (0)