Files
codeql/python/ql/src/Metrics/FLinesOfComments.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

17 lines
493 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 ModuleMetrics m, int n
where n = m.getNumberOfLinesOfComments() + m.getNumberOfLinesOfDocStrings()
select m, n order by n desc