Merge pull request #181 from github/loc-description-improvements

LOC summary query improvements
This commit is contained in:
Alex Ford
2021-05-14 16:13:42 +01:00
committed by GitHub
2 changed files with 9 additions and 6 deletions

View File

@@ -1,13 +1,14 @@
/**
* @id rb/summary/lines-of-code
* @name Total lines of Ruby code in the database
* @description The total number of lines of Ruby code across all files,
* including vendored code, tests. This query counts the lines of code,
* excluding whitespace or comments.
* @description The total number of lines of Ruby code from the source code
* directory, 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
*/
import ruby
select sum(File f | | f.getNumberOfLinesOfCode())
select sum(File f | exists(f.getRelativePath()) | f.getNumberOfLinesOfCode())

View File

@@ -1,7 +1,9 @@
/**
* @id rb/summary/lines-of-user-code
* @name Lines of authored Ruby code in the database
* @description The total number of lines of Ruby code across files, excluding library and generated code.
* @name Total Lines of user written Ruby code in the database
* @description The total number of lines of Ruby code from the source code
* directory, excluding external library and auto-generated files. This
* query counts the lines of code, excluding whitespace or comments.
* @kind metric
* @tags summary
*/