Skip to content

Commit efba220

Browse files
committed
JS: fix most ql/missing-parameter-qldoc issues
1 parent ecd3ace commit efba220

25 files changed

+55
-55
lines changed

javascript/ql/lib/semmle/javascript/BasicBlocks.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class BasicBlock extends @cfg_node, NodeInStmtContainer {
146146
/** Holds if this basic block uses variable `v` in its `i`th node `u`. */
147147
predicate useAt(int i, Variable v, VarUse u) { useAt(this, i, v, u) }
148148

149-
/** Holds if this basic block defines variable `v` in its `i`th node `u`. */
149+
/** Holds if this basic block defines variable `v` in its `i`th node `d`. */
150150
predicate defAt(int i, Variable v, VarDef d) { defAt(this, i, v, d) }
151151

152152
/**

javascript/ql/lib/semmle/javascript/CharacterEscapes.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ module CharacterEscapes {
7575
}
7676

7777
/**
78-
* Gets a character in `n` that is preceded by a single useless backslash, resulting in a likely regular expression mistake explained by `mistake`.
78+
* Gets a character in `src` that is preceded by a single useless backslash, resulting in a likely regular expression mistake explained by `mistake`.
7979
*
8080
* The character is the `i`th character of the raw string value of `rawStringNode`.
8181
*/

javascript/ql/lib/semmle/javascript/ES2015Modules.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class BulkReExportDeclaration extends ReExportDeclaration, @export_all_declarati
337337
}
338338

339339
/**
340-
* Holds if the given bulk export should not re-export `name` because there is an explicit export
340+
* Holds if the given bulk export `reExport` should not re-export `name` because there is an explicit export
341341
* of that name in the same module.
342342
*
343343
* At compile time, shadowing works across declaration spaces.

javascript/ql/lib/semmle/javascript/Paths.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private Path resolveUpTo(PathString p, int n, Folder root, boolean inTS) {
180180
}
181181

182182
/**
183-
* Gets the `i`th component of the path `str`, where `base` is the resolved path one level up.
183+
* Gets the `n`th component of the path `str`, where `base` is the resolved path one level up.
184184
* Supports that the root directory might be compiled output from TypeScript.
185185
* `inTS` is true if the result is TypeScript that is compiled into the path specified by `str`.
186186
*/
@@ -227,7 +227,7 @@ private module TypeScriptOutDir {
227227
}
228228

229229
/**
230-
* Gets the `outDir` option from a tsconfig file from the folder `parent`.
230+
* Gets the "outDir" option from a `tsconfig` file from the folder `parent`.
231231
*/
232232
private string getOutDir(JsonObject tsconfig, Folder parent) {
233233
tsconfig.getFile().getBaseName().regexpMatch("tsconfig.*\\.json") and

javascript/ql/lib/semmle/javascript/RangeAnalysis.qll

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ module RangeAnalysis {
260260
}
261261

262262
/**
263-
* Holds if the given comparison can be modeled as `A <op> B + bias` where `<op>` is the comparison operator,
263+
* Holds if the given `comparison` can be modeled as `A <op> B + bias` where `<op>` is the comparison operator,
264264
* and `A` is `a * asign` and likewise `B` is `b * bsign`.
265265
*/
266266
predicate linearComparison(
@@ -310,18 +310,18 @@ module RangeAnalysis {
310310
* Holds if `guard` asserts that the outcome of `A <op> B + bias` is true, where `<op>` is a comparison operator.
311311
*/
312312
predicate linearComparisonGuard(
313-
ConditionGuardNode guard, DataFlow::Node a, int asign, string operator, DataFlow::Node b,
314-
int bsign, Bias bias
313+
ConditionGuardNode guard, DataFlow::Node a, int asign, string op, DataFlow::Node b, int bsign,
314+
Bias bias
315315
) {
316316
exists(Comparison compare |
317317
compare = guard.getTest().flow().getImmediatePredecessor*().asExpr() and
318318
linearComparison(compare, a, asign, b, bsign, bias) and
319319
(
320-
guard.getOutcome() = true and operator = compare.getOperator()
320+
guard.getOutcome() = true and op = compare.getOperator()
321321
or
322322
not hasNaNIndicator(guard.getContainer()) and
323323
guard.getOutcome() = false and
324-
operator = negateOperator(compare.getOperator())
324+
op = negateOperator(compare.getOperator())
325325
)
326326
)
327327
}
@@ -657,13 +657,13 @@ module RangeAnalysis {
657657
*/
658658
pragma[noopt]
659659
private predicate reachableByNegativeEdges(
660-
DataFlow::Node a, int asign, DataFlow::Node b, int bsign, ControlFlowNode cfg
660+
DataFlow::Node src, int asign, DataFlow::Node dst, int bsign, ControlFlowNode cfg
661661
) {
662-
negativeEdge(a, asign, b, bsign, cfg)
662+
negativeEdge(src, asign, dst, bsign, cfg)
663663
or
664664
exists(DataFlow::Node mid, int midx, ControlFlowNode midcfg |
665-
reachableByNegativeEdges(a, asign, mid, midx, cfg) and
666-
negativeEdge(mid, midx, b, bsign, midcfg) and
665+
reachableByNegativeEdges(src, asign, mid, midx, cfg) and
666+
negativeEdge(mid, midx, dst, bsign, midcfg) and
667667
exists(BasicBlock bb, int i, int j |
668668
bb.getNode(i) = midcfg and
669669
bb.getNode(j) = cfg and
@@ -676,8 +676,8 @@ module RangeAnalysis {
676676
DataFlow::Node mid, int midx, ControlFlowNode midcfg, BasicBlock midBB,
677677
ReachableBasicBlock midRBB, BasicBlock cfgBB
678678
|
679-
reachableByNegativeEdges(a, asign, mid, midx, cfg) and
680-
negativeEdge(mid, midx, b, bsign, midcfg) and
679+
reachableByNegativeEdges(src, asign, mid, midx, cfg) and
680+
negativeEdge(mid, midx, dst, bsign, midcfg) and
681681
midBB = midcfg.getBasicBlock() and
682682
midRBB = midBB.(ReachableBasicBlock) and
683683
cfgBB = cfg.getBasicBlock() and

javascript/ql/lib/semmle/javascript/SSA.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ class SsaExplicitDefinition extends SsaDefinition, TExplicitDef {
501501
}
502502

503503
/** This SSA definition corresponds to the definition of `v` at `def`. */
504-
predicate defines(VarDef d, SsaSourceVariable v) { this = TExplicitDef(_, _, d, v) }
504+
predicate defines(VarDef def, SsaSourceVariable v) { this = TExplicitDef(_, _, def, v) }
505505

506506
/** Gets the variable definition wrapped by this SSA definition. */
507507
VarDef getDef() { this = TExplicitDef(_, _, result, _) }

javascript/ql/lib/semmle/javascript/dataflow/Configuration.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ abstract class BarrierGuardNode extends DataFlow::Node {
353353
}
354354

355355
/**
356-
* Holds if data flow node `nd` acts as a barrier for data flow.
356+
* Holds if data flow node `guard` acts as a barrier for data flow.
357357
*
358358
* `label` is bound to the blocked label, or the empty string if all labels should be blocked.
359359
*/
@@ -382,7 +382,7 @@ private predicate barrierGuardIsRelevant(BarrierGuardNode guard) {
382382
}
383383

384384
/**
385-
* Holds if data flow node `nd` acts as a barrier for data flow due to aliasing through
385+
* Holds if data flow node `guard` acts as a barrier for data flow due to aliasing through
386386
* an access path.
387387
*
388388
* `label` is bound to the blocked label, or the empty string if all labels should be blocked.
@@ -1155,7 +1155,7 @@ private predicate appendStep(
11551155
}
11561156

11571157
/**
1158-
* Holds if a function invoked at `invk` may return an expression into which `input`,
1158+
* Holds if a function invoked at `output` may return an expression into which `input`,
11591159
* which is either an argument or a definition captured by the function, flows under
11601160
* configuration `cfg`, possibly through callees.
11611161
*/
@@ -1391,7 +1391,7 @@ private predicate reachableFromStoreBase(
13911391
}
13921392

13931393
/**
1394-
* Holds if `base` is the base of a write to property `prop`, and `nd` is reachable
1394+
* Holds if `base` is the base of a write to property `endProp`, and `nd` is reachable
13951395
* from `base` under configuration `cfg` (possibly through callees) along a path whose
13961396
* last step is summarized by `newSummary`, and the previous steps are summarized
13971397
* by `oldSummary`.
@@ -1752,7 +1752,7 @@ class PathNode extends TPathNode {
17521752
this = MkSinkNode(nd, cfg)
17531753
}
17541754

1755-
/** Holds if this path node wraps data-flow node `nd` and configuration `c`. */
1755+
/** Holds if this path node wraps data-flow node `n` and configuration `c`. */
17561756
predicate wraps(DataFlow::Node n, DataFlow::Configuration c) { nd = n and cfg = c }
17571757

17581758
/** Gets the underlying configuration of this path node. */
@@ -1867,7 +1867,7 @@ class MidPathNode extends PathNode, MkMidNode {
18671867

18681868
MidPathNode() { this = MkMidNode(nd, cfg, summary) }
18691869

1870-
/** Holds if this path node wraps data-flow node `nd`, configuration `c` and summary `s`. */
1870+
/** Holds if this path node wraps data-flow node `n`, configuration `c` and summary `s`. */
18711871
predicate wraps(DataFlow::Node n, DataFlow::Configuration c, PathSummary s) {
18721872
nd = n and cfg = c and summary = s
18731873
}

javascript/ql/lib/semmle/javascript/dataflow/DataFlow.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1613,7 +1613,7 @@ module DataFlow {
16131613
}
16141614

16151615
/**
1616-
* Holds if the flow information for this node is incomplete.
1616+
* Holds if the flow information for the node `nd`.
16171617
*
16181618
* This predicate holds if there may be a source flow node from which data flows into
16191619
* this node, but that node is not a result of `getALocalSource()` due to analysis incompleteness.

javascript/ql/lib/semmle/javascript/dataflow/Portals.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ private module ReturnPortal {
498498
invk = callee.getAnExitNode(isRemote).getAnInvocation()
499499
}
500500

501-
/** Holds if `ret` is a return node of a function flowing through `callee`. */
501+
/** Holds if `ret` is a return node of a function flowing through `base`. */
502502
predicate returns(Portal base, DataFlow::Node ret, boolean escapes) {
503503
ret = base.getAnEntryNode(escapes).getALocalSource().(DataFlow::FunctionNode).getAReturn()
504504
}

javascript/ql/lib/semmle/javascript/dataflow/TaintTracking.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ module TaintTracking {
831831
}
832832

833833
/**
834-
* Holds if the property `loadStep` should be copied from the object `pred` to the property `storeStep` of object `succ`.
834+
* Holds if the property `loadProp` should be copied from the object `pred` to the property `storeProp` of object `succ`.
835835
*
836836
* This step is used to copy the value of our pseudo-property that can later be accessed using a `get` or `getAll` call.
837837
* For an expression `url.searchParams`, the property `hiddenUrlPseudoProperty()` from the `url` object is stored in the property `getableUrlPseudoProperty()` on `url.searchParams`.

0 commit comments

Comments
 (0)