Skip to content

Commit daed33f

Browse files
committed
JS: fix more instances of ql/missing-parameter-qldoc
1 parent 3762ce2 commit daed33f

File tree

14 files changed

+31
-30
lines changed

14 files changed

+31
-30
lines changed

javascript/ql/examples/queries/dataflow/TemplateInjection/TemplateInjection.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import DataFlow::PathGraph
1414
/**
1515
* Gets the name of an unescaped placeholder in a lodash template.
1616
*
17-
* For example, the string `<h1><%= title %></h1>` contains the placeholder `title`.
17+
* For example, the string "<h1><%= title %></h1>" contains the placeholder "title".
1818
*/
1919
bindingset[s]
2020
string getAPlaceholderInString(string s) {

javascript/ql/lib/semmle/javascript/Classes.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class ClassDefinition extends @class_definition, ClassOrInterface, AST::ValueNod
172172
/** Gets the expression denoting the super class of the defined class, if any. */
173173
override Expr getSuperClass() { result = this.getChildExpr(1) }
174174

175-
/** Gets the `n`th type from the `implements` clause of this class, starting at 0. */
175+
/** Gets the `i`th type from the `implements` clause of this class, starting at 0. */
176176
override TypeExpr getSuperInterface(int i) {
177177
// AST indices for super interfaces: -1, -4, -7, ...
178178
exists(int astIndex | typeexprs(result, _, this, astIndex, _) |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private predicate hasNamedExports(ES2015Module mod) {
5454
}
5555

5656
/**
57-
* Holds if this module contains a `default` export.
57+
* Holds if this module contains a default export.
5858
*/
5959
private predicate hasDefaultExport(ES2015Module mod) {
6060
// export default foo;

javascript/ql/lib/semmle/javascript/PrintAst.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private module PrintJavaScript {
195195
* Gets the `i`th child of `element`.
196196
* Can be overriden in subclasses to get more specific behavior for `getChild()`.
197197
*/
198-
AstNode getChildNode(int childIndex) { result = getLocationSortedChild(element, childIndex) }
198+
AstNode getChildNode(int i) { result = getLocationSortedChild(element, i) }
199199
}
200200

201201
/** Provides predicates for pretty printing `AstNode`s. */

javascript/ql/lib/semmle/javascript/Routing.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ module Routing {
229229
}
230230

231231
/**
232-
* Holds if `node` has processed the incoming request strictly prior to this node.
232+
* Holds if `guard` has processed the incoming request strictly prior to this node.
233233
*/
234234
pragma[inline]
235235
private predicate isGuardedByNodeInternal(Node guard) {

javascript/ql/lib/semmle/javascript/TypeScript.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ class TypeAccess extends @typeaccess, TypeExpr, TypeRef {
751751
}
752752

753753
/**
754-
* Gets a suitable name for the library imported by `import`.
754+
* Gets a suitable name for the library imported by `imprt`.
755755
*
756756
* For relative imports, this is the snapshot-relative path to the imported module.
757757
* For non-relative imports, it is the import path itself.

javascript/ql/lib/semmle/javascript/frameworks/Bundling.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ private predicate isBrowserifyDependencyMap(ObjectExpr deps) {
102102
* Holds if `m` is a function that looks like a bundled module created
103103
* by Webpack.
104104
*
105-
* Parameters must be named either `module` or `exports`,
106-
* or their name must contain the substring `webpack_require`
107-
* or `webpack_module_template_argument`.
105+
* Parameters must be named either "module" or "exports",
106+
* or their name must contain the substring "webpack_require"
107+
* or "webpack_module_template_argument".
108108
*/
109109
private predicate isWebpackModule(FunctionExpr m) {
110110
forex(Parameter parm | parm = m.getAParameter() |

javascript/ql/lib/semmle/javascript/frameworks/ConnectExpressShared.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module ConnectExpressShared {
5050
}
5151

5252
/**
53-
* Holds if `fun` appears to match the given signature based on parameter naming.
53+
* Holds if `function` appears to match the given signature based on parameter naming.
5454
*/
5555
private predicate matchesSignature(Function function, RouteHandlerSignature sig) {
5656
function.getNumParameter() = sig.getArity() and

javascript/ql/lib/semmle/javascript/frameworks/NoSQL.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,11 +584,11 @@ private module Minimongo {
584584
*/
585585
module CollectionMethodSignatures {
586586
/**
587-
* Holds if Collection method `name` interprets parameter `n` as a query.
587+
* Holds if Collection method `name` interprets parameter `queryArgIdx` as a query.
588588
*/
589-
predicate interpretsArgumentAsQuery(string m, int queryArgIdx) {
589+
predicate interpretsArgumentAsQuery(string name, int queryArgIdx) {
590590
// implements most of the MongoDB interface
591-
MongoDB::CollectionMethodSignatures::interpretsArgumentAsQuery(m, queryArgIdx)
591+
MongoDB::CollectionMethodSignatures::interpretsArgumentAsQuery(name, queryArgIdx)
592592
}
593593
}
594594

javascript/ql/lib/semmle/javascript/frameworks/SocketIO.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module SocketIO {
5555
/** Gets the namespace with the given path of this server. */
5656
NamespaceObject getNamespace(string path) { result = MkNamespace(this, path) }
5757

58-
/** Gets a api node that may refer to the socket.io server created at `srv`. */
58+
/** Gets a api node that may refer to a socket.io server. */
5959
private API::Node server() {
6060
result = node
6161
or
@@ -144,7 +144,7 @@ module SocketIO {
144144
override NamespaceObject getNamespace() { result = ns }
145145

146146
/**
147-
* Gets a data flow node that may refer to the socket.io namespace created at `ns`.
147+
* Gets a data flow node that may refer a the socket.io namespace.
148148
*/
149149
private API::Node namespace() {
150150
result = node

0 commit comments

Comments
 (0)