mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
JS: improve alert location of js/angular/unused-dependency
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
import javascript
|
||||
import Declarations.UnusedParameter
|
||||
import semmle.javascript.RestrictedLocations
|
||||
|
||||
predicate isUnusedParameter(Function f, string msg, Parameter parameter) {
|
||||
exists(Variable pv |
|
||||
@@ -36,4 +37,4 @@ predicate isMissingParameter(AngularJS::InjectableFunction f, string msg, ASTNod
|
||||
|
||||
from AngularJS::InjectableFunction f, string message, ASTNode location
|
||||
where isUnusedParameter(f.asFunction(), message, location) or isMissingParameter(f, message, location)
|
||||
select location, message
|
||||
select (FirstLineOf)location, message
|
||||
|
||||
Reference in New Issue
Block a user