JS: Add ImportGraph meta query

This commit is contained in:
Asger Feldthaus
2021-04-01 12:43:06 +01:00
parent 20416ae034
commit c4ab6fb7b4

View File

@@ -0,0 +1,15 @@
/**
* @name Import graph
* @description An edge in the import graph.
* @kind problem
* @problem.severity recommendation
* @id js/meta/alerts/import-graph
* @tags meta
* @precision very-low
*/
import javascript
from Import imprt, Module target
where target = imprt.getImportedModule()
select imprt, "Import targeting $@", target, target.getFile().getRelativePath()