Skip to content

Commit abb9513

Browse files
committed
JS: Add UnresolvableImport metric
1 parent d995d5a commit abb9513

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* @name Unresolvable imports
3+
* @description The number of imports that could not be resolved to a module.
4+
* @kind metric
5+
* @metricType project
6+
* @metricAggregate sum
7+
* @tags meta
8+
* @id js/meta/unresolvable-imports
9+
*/
10+
11+
import javascript
12+
import CallGraphQuality
13+
14+
Import unresolvableImport() {
15+
not exists(result.getImportedModule())
16+
}
17+
18+
select projectRoot(), count(unresolvableImport())

0 commit comments

Comments
 (0)