mirror of
https://github.com/github/codeql.git
synced 2026-02-27 04:13:51 +01:00
In hindsight, having a `.getMetrics()` method that just returns `this` is somewhat weird. It's possible that it predates the existence of the inline cast, however.
18 lines
523 B
Plaintext
18 lines
523 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
|
|
private import LegacyPointsTo
|
|
|
|
from ModuleMetrics m, int n
|
|
where n = m.getNumberOfLinesOfComments() + m.getNumberOfLinesOfDocStrings()
|
|
select m, n order by n desc
|