mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
JS: Make getDocumentation handle chain assignments
This commit is contained in:
@@ -55,6 +55,14 @@ class ExprOrType extends @exprortype, Documentable {
|
||||
exists(DotExpr dot | this = dot.getProperty() |
|
||||
result = dot.getDocumentation()
|
||||
)
|
||||
or
|
||||
exists(AssignExpr e | this = e.getRhs() |
|
||||
result = e.getDocumentation()
|
||||
)
|
||||
or
|
||||
exists(ParExpr p | this = p.getExpression() |
|
||||
result = p.getDocumentation()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
| tst.js:4:4:4:9 | @param | @param tag refers to non-existent parameter prameter. |
|
||||
| tst.js:12:4:12:9 | @param | @param tag refers to non-existent parameter sign. |
|
||||
| tst.js:51:4:51:9 | @param | @param tag refers to non-existent parameter opts. |
|
||||
| tst.js:57:4:57:9 | @param | @param tag refers to non-existent parameter opts. |
|
||||
|
||||
@@ -45,4 +45,16 @@ function good3() {
|
||||
lastName = arguments[0];
|
||||
}
|
||||
return firstName + sep + lastName;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {IncomingMessage} opts
|
||||
*/
|
||||
var Cookie = foo.bar = function Cookie(options) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {IncomingMessage} opts
|
||||
*/
|
||||
Cookie2 = foo.bar2 = function Cookie2(options) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user