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:
Max Schaefer
2018-08-09 13:58:11 +01:00
committed by GitHub
4 changed files with 24 additions and 13 deletions

View File

@@ -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