mirror of
https://github.com/github/codeql.git
synced 2025-12-25 21:26:37 +01:00
Move the `lines-of-code` tag from `py/summary/lines-of-code`. Code Scanning will eventually look for this tag. The intent is to treat the number of lines of user code for Python as the summary of how much code was analysed, ignoring both external libraries and generated code. This matches the current baseline metric the CodeQL Action computes for Python. We'll revisit this decision, and the baseline, if necessary.
14 lines
468 B
Plaintext
14 lines
468 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
|
|
* @id py/summary/lines-of-code
|
|
*/
|
|
|
|
import python
|
|
|
|
select sum(Module m | | m.getMetrics().getNumberOfLinesOfCode())
|