Files
codeql/java/ql/src/Metrics/Files/FNumberOfInterfaces.ql
2018-10-11 11:31:37 +02:00

17 lines
407 B
Plaintext

/**
* @name Number of interfaces
* @description The number of interfaces in a compilation unit.
* @kind treemap
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @id java/interfaces-per-file
* @tags maintainability
*/
import java
from CompilationUnit f, int n
where n = count(Interface i | i.fromSource() and i.getCompilationUnit() = f)
select f, n order by n desc