mirror of
https://github.com/github/codeql.git
synced 2026-02-19 08:23:45 +01:00
20 lines
544 B
Plaintext
20 lines
544 B
Plaintext
/**
|
|
* @id rb/summary/lines-of-user-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
|
|
*/
|
|
|
|
import ruby
|
|
|
|
select sum(File f |
|
|
f.fromSource() and
|
|
exists(f.getRelativePath()) and
|
|
not f.getAbsolutePath().matches("%/vendor/%")
|
|
|
|
|
f.getNumberOfLinesOfCode()
|
|
)
|