diff --git a/ql/src/queries/summary/LinesOfCode.ql b/ql/src/queries/summary/LinesOfCode.ql new file mode 100644 index 00000000000..958a931a16d --- /dev/null +++ b/ql/src/queries/summary/LinesOfCode.ql @@ -0,0 +1,13 @@ +/** + * @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. + * @kind metric + * @tags summary + */ + +import ruby + +select sum(File f | | f.getNumberOfLinesOfCode())