Skip to content

Commit 7121a18

Browse files
committed
JS: address comments
1 parent 1130d0c commit 7121a18

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

change-notes/1.20/analysis-javascript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
| **Query** | **Tags** | **Purpose** |
88
|-----------------------------------------------|------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
99
| Double escaping or unescaping (`js/double-escaping`) | correctness, security, external/cwe/cwe-116 | Highlights potential double escaping or unescaping of special characters, indicating a possible violation of [CWE-116](https://cwe.mitre.org/data/definitions/116.html). Results are shown on LGTM by default. |
10-
| Incorrect suffix check (`js/incorrect-suffix-check`) | correctness, security, external/cwe/cwe-020 | Highlights error-prone suffix checks based on `indexOf`, indicating a potential violation of [CWE-20](https://cwe.mitre.org/data/definitions/20.html). |
11-
| Useless comparison test (`js/useless-comparison-test`) | correctness | Highlights code that is unreachable due to a numeric comparison that is always true or always false. |
10+
| Incorrect suffix check (`js/incorrect-suffix-check`) | correctness, security, external/cwe/cwe-020 | Highlights error-prone suffix checks based on `indexOf`, indicating a potential violation of [CWE-20](https://cwe.mitre.org/data/definitions/20.html). Results are shown on LGTM by default. |
11+
| Useless comparison test (`js/useless-comparison-test`) | correctness | Highlights code that is unreachable due to a numeric comparison that is always true or always false. Results are shown on LGTM by default. |
1212

1313
## Changes to existing queries
1414

javascript/ql/src/Security/CWE-020/IncorrectSuffixCheck.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Incorrect suffix check
3-
* @description Using indexOf to implement endsWith functionality is error prone if the -1 case is not explicitly handled.
3+
* @description Using indexOf to implement endsWith functionality is error-prone if the -1 case is not explicitly handled.
44
* @kind problem
55
* @problem.severity error
66
* @precision high

0 commit comments

Comments
 (0)