mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
JS: Add UnresolvableImport metric
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @name Unresolvable imports
|
||||
* @description The number of imports that could not be resolved to a module.
|
||||
* @kind metric
|
||||
* @metricType project
|
||||
* @metricAggregate sum
|
||||
* @tags meta
|
||||
* @id js/meta/unresolvable-imports
|
||||
*/
|
||||
|
||||
import javascript
|
||||
import CallGraphQuality
|
||||
|
||||
Import unresolvableImport() {
|
||||
not exists(result.getImportedModule())
|
||||
}
|
||||
|
||||
select projectRoot(), count(unresolvableImport())
|
||||
Reference in New Issue
Block a user