mirror of
https://github.com/github/codeql.git
synced 2026-01-30 14:52:57 +01:00
Will need subsequent PRs fixing up test failures (due to deprecated methods moving around), but other than that everything should be straight-forward.
21 lines
478 B
Plaintext
21 lines
478 B
Plaintext
/**
|
|
* @name Recently changed files
|
|
* @description Number of files recently edited
|
|
* @kind treemap
|
|
* @id py/historical-number-of-recent-changed-files
|
|
* @treemap.warnOn highValues
|
|
* @metricType file
|
|
* @metricAggregate avg min max
|
|
*/
|
|
|
|
import python
|
|
import external.VCS
|
|
|
|
from Module m
|
|
where
|
|
exists(Commit e |
|
|
e.getAnAffectedFile() = m.getFile() and e.daysToNow() <= 180 and not artificialChange(e)
|
|
) and
|
|
exists(m.getMetrics().getNumberOfLinesOfCode())
|
|
select m, 1
|