mirror of
https://github.com/github/codeql.git
synced 2026-02-19 08:23:45 +01:00
Merge pull request #181 from github/loc-description-improvements
LOC summary query improvements
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user