mirror of
https://github.com/github/codeql.git
synced 2026-01-10 05:00:29 +01:00
18 lines
514 B
Plaintext
18 lines
514 B
Plaintext
/**
|
|
* @name Lines of comments in files
|
|
* @kind treemap
|
|
* @description Measures the number of lines of comments in each file (including docstrings,
|
|
* and ignoring lines that contain only code or are blank).
|
|
* @treemap.warnOn lowValues
|
|
* @metricType file
|
|
* @metricAggregate avg sum max
|
|
* @id py/lines-of-comments-in-files
|
|
*/
|
|
|
|
import python
|
|
|
|
from Module m, int n
|
|
where
|
|
n = m.getMetrics().getNumberOfLinesOfComments() + m.getMetrics().getNumberOfLinesOfDocStrings()
|
|
select m, n order by n desc
|