mirror of
https://github.com/github/codeql.git
synced 2026-03-30 20:28:15 +02:00
The ones that no longer require points-to no longer import `LegacyPointsTo`. The ones that do use the specific `...MetricsWithPointsTo` classes that are applicable.
24 lines
551 B
Plaintext
24 lines
551 B
Plaintext
/**
|
|
* @name Churned lines per file
|
|
* @description Number of churned lines per file, across the revision history in the database.
|
|
* @kind treemap
|
|
* @id py/historical-churn
|
|
* @treemap.warnOn highValues
|
|
* @metricType file
|
|
* @metricAggregate avg sum max
|
|
*/
|
|
|
|
import python
|
|
import external.VCS
|
|
|
|
from ModuleMetrics m, int n
|
|
where
|
|
n =
|
|
sum(Commit entry, int churn |
|
|
churn = entry.getRecentChurnForFile(m.getFile()) and not artificialChange(entry)
|
|
|
|
|
churn
|
|
) and
|
|
exists(m.getNumberOfLinesOfCode())
|
|
select m, n order by n desc
|