mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Merge pull request #31 from esben-semmle/js/fewer-alerts-for-incomplete-object-initialization
JS: change alert location for js/incomplete-object-initialization
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 e, "The super constructor must be called before using '" + kind + "'."
|
||||
select (FirstLineOf)ctor, "The super constructor must be called before using '$@'.", e, kind
|
||||
Reference in New Issue
Block a user