Skip to content

Commit

Permalink
Merge pull request github#1074 from xiemaisi/js/socket.io-comm
Browse files Browse the repository at this point in the history
Approved by esben-semmle
  • Loading branch information
semmle-qlci authored Mar 13, 2019
2 parents 5f480af + f540dcb commit 6baf526
Show file tree
Hide file tree
Showing 56 changed files with 846 additions and 192 deletions.
18 changes: 18 additions & 0 deletions change-notes/1.21/analysis-javascript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Improvements to JavaScript analysis

## General improvements

* Support for the following frameworks and libraries has been improved:
- [socket.io](http://socket.io)

## New queries

| **Query** | **Tags** | **Purpose** |
|-----------------------------------------------|------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

## Changes to existing queries

| **Query** | **Expected impact** | **Change** |
|--------------------------------------------|------------------------------|------------------------------------------------------------------------------|

## Changes to QL libraries
3 changes: 3 additions & 0 deletions javascript/ql/src/semmle/javascript/dataflow/Nodes.qll
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ class FunctionNode extends DataFlow::ValueNode, DataFlow::SourceNode {
/** Gets the number of parameters declared on this function. */
int getNumParameter() { result = count(astNode.getAParameter()) }

/** Gets the last parameter of this function. */
ParameterNode getLastParameter() { result = getParameter(getNumParameter()-1) }

/** Holds if the last parameter of this function is a rest parameter. */
predicate hasRestParameter() { astNode.hasRestParameter() }

Expand Down
Loading

0 comments on commit 6baf526

Please sign in to comment.