mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
17 lines
480 B
Plaintext
17 lines
480 B
Plaintext
/**
|
|
* @name Number of classes
|
|
* @description Files with a large number of classes are difficult to read. Additionally the structure of the project is not reflected in the file system.
|
|
* @kind treemap
|
|
* @treemap.warnOn highValues
|
|
* @metricType file
|
|
* @metricAggregate avg sum max
|
|
* @tags maintainability
|
|
* @id cs/classes-per-file
|
|
*/
|
|
import csharp
|
|
|
|
from SourceFile f, int n
|
|
where n = count(Class c | c.getFile() = f and c.isSourceDeclaration())
|
|
select f, n
|
|
order by n desc
|