Skip to content

Commit 1b59a28

Browse files
author
Max Schaefer
committed
JavaScript: Downgrade a few "error" rules to "warning".
For all of these queries, the results we tend to see in practice are certainly worth investigating, but aren't crashing bugs, so making them warnings seems more appropriate.
1 parent db175f5 commit 1b59a28

File tree

6 files changed

+10
-5
lines changed

6 files changed

+10
-5
lines changed

change-notes/1.19/analysis-javascript.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,15 @@
3535

3636
| **Query** | **Expected impact** | **Change** |
3737
|--------------------------------|----------------------------|----------------------------------------------|
38+
| Ambiguous HTML id attribute | Lower severity | The severity of this rule has been revised to "warning". |
3839
| Client side cross-site scripting | More results | This rule now also flags HTML injection in the body of an email. |
3940
| Client-side URL redirect | Fewer false-positive results | This rule now recognizes safe redirects in more cases. |
41+
| Conflicting HTML element attributes | Lower severity | The severity of this rule has been revised to "warning". |
42+
| Duplicate 'if' condition | Lower severity | The severity of this rule has been revised to "warning". |
43+
| Duplicate switch case | Lower severity | The severity of this rule has been revised to "warning". |
4044
| Information exposure through a stack trace | More results | This rule now also flags cases where the entire exception object (including the stack trace) may be exposed. |
4145
| Missing CSRF middleware | Fewer false-positive results | This rule now recognizes additional CSRF protection middlewares. |
46+
| Missing variable declaration | Lower severity | The severity of this rule has been revised to "warning". |
4247
| Regular expression injection | Fewer false-positive results | This rule now identifies calls to `String.prototype.search` with more precision. |
4348
| Remote property injection | Fewer results | The precision of this rule has been revised to "medium". Results are no longer shown on LGTM by default. |
4449
| Self assignment | Fewer false-positive results | This rule now ignores self-assignments preceded by a JSDoc comment with a `@type` tag. |

javascript/ql/src/DOM/AmbiguousIdAttribute.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* same id attribute, it may be interpreted differently
55
* by different browsers.
66
* @kind problem
7-
* @problem.severity error
7+
* @problem.severity warning
88
* @id js/duplicate-html-id
99
* @tags maintainability
1010
* correctness

javascript/ql/src/DOM/ConflictingAttributes.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @description If an HTML element has two attributes with the same name
44
* but different values, its behavior may be browser-dependent.
55
* @kind problem
6-
* @problem.severity error
6+
* @problem.severity warning
77
* @id js/conflicting-html-attribute
88
* @tags maintainability
99
* correctness

javascript/ql/src/Declarations/MissingVarDecl.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @description If a variable is not declared as a local variable, it becomes a global variable
44
* by default, which may be unintentional and could lead to unexpected behavior.
55
* @kind problem
6-
* @problem.severity error
6+
* @problem.severity warning
77
* @id js/missing-variable-declaration
88
* @tags reliability
99
* maintainability

javascript/ql/src/Expressions/DuplicateCondition.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @description If two conditions in an 'if'-'else if' chain are identical, the
44
* second condition will never hold.
55
* @kind problem
6-
* @problem.severity error
6+
* @problem.severity warning
77
* @id js/duplicate-condition
88
* @tags maintainability
99
* correctness

javascript/ql/src/Expressions/DuplicateSwitchCase.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @description If two cases in a switch statement have the same label, the second case
44
* will never be executed.
55
* @kind problem
6-
* @problem.severity error
6+
* @problem.severity warning
77
* @id js/duplicate-switch-case
88
* @tags maintainability
99
* correctness

0 commit comments

Comments
 (0)