mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
JS: restrict alert location to a single line
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
import javascript
|
||||
import semmle.javascript.RestrictedLocations
|
||||
|
||||
/**
|
||||
* Holds if `e` is an expression of the given `kind` that must be guarded by a
|
||||
@@ -59,4 +60,4 @@ where needsGuard(e, kind) and unguarded(e, ctor) and
|
||||
sc.getBinder() = ctor and
|
||||
sc.getEnclosingFunction() != ctor
|
||||
)
|
||||
select ctor, "The super constructor must be called before using '$@'.", e, kind
|
||||
select (FirstLineOf)ctor, "The super constructor must be called before using '$@'.", e, kind
|
||||
@@ -10,5 +10,5 @@
|
||||
| invalid.js:14:35:14:118 | () { cl ... er(); } | The super constructor must be called before using '$@'. | invalid.js:14:99:14:102 | this | this |
|
||||
| invalid.js:15:71:15:95 | () { th ... er(); } | The super constructor must be called before using '$@'. | invalid.js:15:76:15:79 | this | this |
|
||||
| invalid.js:16:35:16:66 | () { if ... .a(); } | The super constructor must be called before using '$@'. | invalid.js:16:56:16:59 | this | this |
|
||||
| invalid.js:26:16:29:5 | () {\\n ... ;\\n } | The super constructor must be called before using '$@'. | invalid.js:27:9:27:12 | this | this |
|
||||
| invalid.js:26:16:29:5 | () {\\n ... ;\\n } | The super constructor must be called before using '$@'. | invalid.js:28:9:28:12 | this | this |
|
||||
| invalid.js:26:16:26:19 | () {\\n ... ;\\n } | The super constructor must be called before using '$@'. | invalid.js:27:9:27:12 | this | this |
|
||||
| invalid.js:26:16:26:19 | () {\\n ... ;\\n } | The super constructor must be called before using '$@'. | invalid.js:28:9:28:12 | this | this |
|
||||
|
||||
Reference in New Issue
Block a user