Skip to content

Commit 6baf526

Browse files
authored
Merge pull request #1074 from xiemaisi/js/socket.io-comm
Approved by esben-semmle
2 parents 5f480af + f540dcb commit 6baf526

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+846
-192
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Improvements to JavaScript analysis
2+
3+
## General improvements
4+
5+
* Support for the following frameworks and libraries has been improved:
6+
- [socket.io](http://socket.io)
7+
8+
## New queries
9+
10+
| **Query** | **Tags** | **Purpose** |
11+
|-----------------------------------------------|------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
12+
13+
## Changes to existing queries
14+
15+
| **Query** | **Expected impact** | **Change** |
16+
|--------------------------------------------|------------------------------|------------------------------------------------------------------------------|
17+
18+
## Changes to QL libraries

javascript/ql/src/semmle/javascript/dataflow/Nodes.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ class FunctionNode extends DataFlow::ValueNode, DataFlow::SourceNode {
325325
/** Gets the number of parameters declared on this function. */
326326
int getNumParameter() { result = count(astNode.getAParameter()) }
327327

328+
/** Gets the last parameter of this function. */
329+
ParameterNode getLastParameter() { result = getParameter(getNumParameter()-1) }
330+
328331
/** Holds if the last parameter of this function is a rest parameter. */
329332
predicate hasRestParameter() { astNode.hasRestParameter() }
330333

0 commit comments

Comments
 (0)