mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
JS: fix more instances of ql/missing-parameter-qldoc
This commit is contained in:
@@ -172,7 +172,7 @@ class ClassDefinition extends @class_definition, ClassOrInterface, AST::ValueNod
|
||||
/** Gets the expression denoting the super class of the defined class, if any. */
|
||||
override Expr getSuperClass() { result = this.getChildExpr(1) }
|
||||
|
||||
/** Gets the `n`th type from the `implements` clause of this class, starting at 0. */
|
||||
/** Gets the `i`th type from the `implements` clause of this class, starting at 0. */
|
||||
override TypeExpr getSuperInterface(int i) {
|
||||
// AST indices for super interfaces: -1, -4, -7, ...
|
||||
exists(int astIndex | typeexprs(result, _, this, astIndex, _) |
|
||||
|
||||
@@ -54,7 +54,7 @@ private predicate hasNamedExports(ES2015Module mod) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this module contains a `default` export.
|
||||
* Holds if this module contains a default export.
|
||||
*/
|
||||
private predicate hasDefaultExport(ES2015Module mod) {
|
||||
// export default foo;
|
||||
|
||||
@@ -195,7 +195,7 @@ private module PrintJavaScript {
|
||||
* Gets the `i`th child of `element`.
|
||||
* Can be overriden in subclasses to get more specific behavior for `getChild()`.
|
||||
*/
|
||||
AstNode getChildNode(int childIndex) { result = getLocationSortedChild(element, childIndex) }
|
||||
AstNode getChildNode(int i) { result = getLocationSortedChild(element, i) }
|
||||
}
|
||||
|
||||
/** Provides predicates for pretty printing `AstNode`s. */
|
||||
|
||||
@@ -229,7 +229,7 @@ module Routing {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `node` has processed the incoming request strictly prior to this node.
|
||||
* Holds if `guard` has processed the incoming request strictly prior to this node.
|
||||
*/
|
||||
pragma[inline]
|
||||
private predicate isGuardedByNodeInternal(Node guard) {
|
||||
|
||||
@@ -751,7 +751,7 @@ class TypeAccess extends @typeaccess, TypeExpr, TypeRef {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a suitable name for the library imported by `import`.
|
||||
* Gets a suitable name for the library imported by `imprt`.
|
||||
*
|
||||
* For relative imports, this is the snapshot-relative path to the imported module.
|
||||
* For non-relative imports, it is the import path itself.
|
||||
|
||||
@@ -102,9 +102,9 @@ private predicate isBrowserifyDependencyMap(ObjectExpr deps) {
|
||||
* Holds if `m` is a function that looks like a bundled module created
|
||||
* by Webpack.
|
||||
*
|
||||
* Parameters must be named either `module` or `exports`,
|
||||
* or their name must contain the substring `webpack_require`
|
||||
* or `webpack_module_template_argument`.
|
||||
* Parameters must be named either "module" or "exports",
|
||||
* or their name must contain the substring "webpack_require"
|
||||
* or "webpack_module_template_argument".
|
||||
*/
|
||||
private predicate isWebpackModule(FunctionExpr m) {
|
||||
forex(Parameter parm | parm = m.getAParameter() |
|
||||
|
||||
@@ -50,7 +50,7 @@ module ConnectExpressShared {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `fun` appears to match the given signature based on parameter naming.
|
||||
* Holds if `function` appears to match the given signature based on parameter naming.
|
||||
*/
|
||||
private predicate matchesSignature(Function function, RouteHandlerSignature sig) {
|
||||
function.getNumParameter() = sig.getArity() and
|
||||
|
||||
@@ -584,11 +584,11 @@ private module Minimongo {
|
||||
*/
|
||||
module CollectionMethodSignatures {
|
||||
/**
|
||||
* Holds if Collection method `name` interprets parameter `n` as a query.
|
||||
* Holds if Collection method `name` interprets parameter `queryArgIdx` as a query.
|
||||
*/
|
||||
predicate interpretsArgumentAsQuery(string m, int queryArgIdx) {
|
||||
predicate interpretsArgumentAsQuery(string name, int queryArgIdx) {
|
||||
// implements most of the MongoDB interface
|
||||
MongoDB::CollectionMethodSignatures::interpretsArgumentAsQuery(m, queryArgIdx)
|
||||
MongoDB::CollectionMethodSignatures::interpretsArgumentAsQuery(name, queryArgIdx)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ module SocketIO {
|
||||
/** Gets the namespace with the given path of this server. */
|
||||
NamespaceObject getNamespace(string path) { result = MkNamespace(this, path) }
|
||||
|
||||
/** Gets a api node that may refer to the socket.io server created at `srv`. */
|
||||
/** Gets a api node that may refer to a socket.io server. */
|
||||
private API::Node server() {
|
||||
result = node
|
||||
or
|
||||
@@ -144,7 +144,7 @@ module SocketIO {
|
||||
override NamespaceObject getNamespace() { result = ns }
|
||||
|
||||
/**
|
||||
* Gets a data flow node that may refer to the socket.io namespace created at `ns`.
|
||||
* Gets a data flow node that may refer a the socket.io namespace.
|
||||
*/
|
||||
private API::Node namespace() {
|
||||
result = node
|
||||
|
||||
@@ -309,12 +309,13 @@ private module JQueryClientRequest {
|
||||
/**
|
||||
* Gets a node refering to the response contained in an `jqXHR` object.
|
||||
*/
|
||||
private DataFlow::SourceNode getAResponseNodeFromAnXHRObject(DataFlow::SourceNode obj) {
|
||||
private DataFlow::SourceNode getAResponseNodeFromAnXHRObject(DataFlow::SourceNode jqXHR) {
|
||||
result =
|
||||
obj.getAPropertyRead(any(string s |
|
||||
s = "responseText" or
|
||||
s = "responseXML"
|
||||
))
|
||||
jqXHR
|
||||
.getAPropertyRead(any(string s |
|
||||
s = "responseText" or
|
||||
s = "responseXML"
|
||||
))
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user