mirror of
https://github.com/github/codeql.git
synced 2026-06-02 12:20:14 +02:00
17 lines
394 B
Plaintext
17 lines
394 B
Plaintext
/**
|
|
* @name Number of classes
|
|
* @description The number of classes in a compilation unit.
|
|
* @kind treemap
|
|
* @treemap.warnOn highValues
|
|
* @metricType file
|
|
* @metricAggregate avg sum max
|
|
* @id java/classes-per-file
|
|
* @tags maintainability
|
|
*/
|
|
|
|
import java
|
|
|
|
from CompilationUnit f, int n
|
|
where n = count(Class c | c.fromSource() and c.getCompilationUnit() = f)
|
|
select f, n order by n desc
|