Files
codeql/python/ql/src/Summary/LinesOfCode.ql
Taus 24a29f46be Python: Fix all metrics-related compilation failures
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.
2025-11-26 21:28:51 +00:00

16 lines
511 B
Plaintext

/**
* @name Total lines of Python code in the database
* @description The total number of lines of Python code across all files, including
* external libraries and auto-generated files. This is a useful metric of the size of a
* database. This query counts the lines of code, excluding whitespace or comments.
* @kind metric
* @tags summary
* telemetry
* @id py/summary/lines-of-code
*/
import python
private import LegacyPointsTo
select sum(ModuleMetrics m | | m.getNumberOfLinesOfCode())