Skip to content

Commit 605695e

Browse files
author
Esben Sparre Andreasen
committed
JS: review fixups in documentation
1 parent 19e5db7 commit 605695e

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

change-notes/1.18/analysis-javascript.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
| **Query** | **Expected impact** | **Change** |
8888
|----------------------------|------------------------|------------------------------------------------------------------|
8989
| Arguments redefined | Fewer results | This rule previously also flagged redefinitions of `eval`. This was an oversight that is now fixed. |
90-
| Comparison between inconvertible types | Fewer results | This rule now flags fewer comparisons involving IIFE parameters. |
90+
| Comparison between inconvertible types | Fewer results | This rule now flags fewer comparisons involving parameters. |
9191
| Comparison between inconvertible types | Lower severity | The severity of this rule has been revised to "warning". |
9292
| CORS misconfiguration for credentials transfer | More true-positive results | This rule now treats header names case-insensitively. |
9393
| Hard-coded credentials | More true-positive results | This rule now recognizes secret cryptographic keys. |
@@ -102,8 +102,8 @@
102102
| Unused variable | Fewer results | This rule no longer flags class expressions that could be made anonymous. While technically true, these results are not interesting. |
103103
| Unused variable | Renamed | This rule has been renamed to "Unused variable, import, function or class" to reflect the fact that it flags different kinds of unused program elements. |
104104
| Use of incompletely initialized object| Fewer results | This rule now flags the constructor instead its errorneous `this` or `super` expressions. |
105-
| Useless conditional | Fewer results | This rule no longer flags uses of boolean IIFE return values. |
106-
| Useless conditional | Fewer results | This rule now flags fewer comparisons involving IIFE parameters. |
105+
| Useless conditional | Fewer results | This rule no longer flags uses of boolean return values. |
106+
| Useless conditional | Fewer results | This rule now flags fewer comparisons involving parameters. |
107107

108108
## Changes to QL libraries
109109

javascript/ql/src/Expressions/HeterogeneousComparison.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,7 @@ predicate isInitialParameterUse(Expr e) {
185185
/**
186186
* Holds if `e` is an expression that should not be considered in a heterogeneous comparison.
187187
*
188-
* We currently whitelist these kinds of expressions:
189-
*
190-
* - parameters, as passed in from the caller
188+
* We currently whitelist expressions that rely on inter-procedural parameter information.
191189
*/
192190
predicate whitelist(Expr e) {
193191
isInitialParameterUse(e)

javascript/ql/src/Statements/UselessConditional.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ predicate isConstant(Expr e) {
6464
}
6565

6666
/**
67-
* Holds if `e` directly uses a parameter's initial value as passed in from the caller.
67+
* Holds if `e` directly uses a parameter's negated or initial value as passed in from the caller.
6868
*/
6969
predicate isInitialParameterUse(Expr e) {
7070
// unlike `SimpleParameter.getAnInitialUse` this will not include uses we have refinement information for
@@ -103,8 +103,8 @@ predicate isConstantBooleanReturnValue(Expr e) {
103103
* - constants (including references to literal constants);
104104
* - negations of constants;
105105
* - defensive checks;
106-
* - parameters, as passed in from the caller;
107-
* - constant boolean returned values
106+
* - expressions that rely on inter-procedural parameter information;
107+
* - constant boolean returned values.
108108
*/
109109
predicate whitelist(Expr e) {
110110
isConstant(e) or

0 commit comments

Comments
 (0)