Files
codeql/python/ql/src/Metrics/History/HChurn.ql
Taus e8de8433f4 Python: Update all metrics-dependant queries
The ones that no longer require points-to no longer import
`LegacyPointsTo`. The ones that do use the specific
`...MetricsWithPointsTo` classes that are applicable.
2026-02-19 12:32:27 +00:00

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