C++: Update summary queries.

This commit is contained in:
Cornelius Riemenschneider
2021-03-11 12:44:30 +00:00
committed by GitHub
parent 16a3dfa30a
commit 97ab842010
19 changed files with 36 additions and 49 deletions

View File

@@ -1,11 +0,0 @@
/**
* @id cpp/summary/files
* @name Total source files
* @description The total number of source files.
* @kind metric
* @tags summary
*/
import cpp
select count(File f | f.fromSource())

View File

@@ -1,11 +0,0 @@
/**
* @id cpp/summary/lines
* @name Total lines of text
* @description The total number of lines of text across all source files.
* @kind metric
* @tags summary
*/
import cpp
select sum(File f | f.fromSource() | f.getMetrics().getNumberOfLines())

View File

@@ -1,11 +1,11 @@
/**
* @id cpp/summary/lines-of-code
* @name Total lines of code
* @description The total number of lines of code across all source files.
* @name Total lines of C/C++ code
* @description The total number of lines of C/C++ code across all files, including system headers and libraries.
* @kind metric
* @tags summary
*/
import cpp
select sum(File f | f.fromSource() | f.getMetrics().getNumberOfLinesOfCode())
select sum(File f | f.fromSource() | f.getMetrics().getNumberOfLines())

View File

@@ -1,7 +1,7 @@
/**
* @id cpp/summary/lines-of-code-per-file
* @name Lines of code per source file
* @description The number of lines of code for each source file.
* @name Lines of C/C++ code per source file
* @description The number of lines of C/C++ code for each file in the database, including system headers and libraries.
* @kind metric
* @tags summary
*/
@@ -10,4 +10,4 @@ import cpp
from File f
where f.fromSource()
select f, f.getMetrics().getNumberOfLinesOfCode()
select f, f.getMetrics().getNumberOfLines()

View File

@@ -0,0 +1,11 @@
/**
* @id cpp/summary/lines-of-user-code
* @name Total lines of C/C++ source code
* @description The total number of lines of C/C++ code across all files, excluding system headers and libraries.
* @kind metric
* @tags summary
*/
import cpp
select sum(File f | exists(f.getRelativePath()) | f.getMetrics().getNumberOfLines())

View File

@@ -0,0 +1,13 @@
/**
* @id cpp/summary/lines-of-user-code-per-file
* @name Lines of C/C++ code per source file
* @description The number of lines of C/C++ code for each file in the source directory.
* @kind metric
* @tags summary
*/
import cpp
from File f
where exists(f.getRelativePath())
select f, f.getMetrics().getNumberOfLines()

View File

@@ -1,13 +0,0 @@
/**
* @id cpp/summary/lines-per-file
* @name Lines of text per source file
* @description The number of lines of text for each source file.
* @kind metric
* @tags summary
*/
import cpp
from File f
where f.fromSource()
select f, f.getMetrics().getNumberOfLines()

View File

@@ -1 +0,0 @@
| 3 |

View File

@@ -1 +0,0 @@
Summary/Files.ql

View File

@@ -1 +0,0 @@
Summary/Lines.ql

View File

@@ -1 +1 @@
| 93 |
| 122 |

View File

@@ -1 +1 @@
Summary/LinesOfCode.ql
Summary/LinesOfCode.ql

View File

@@ -1,3 +1,3 @@
| empty-file.cpp:0:0:0:0 | empty-file.cpp | 0 |
| large-file.cpp:0:0:0:0 | large-file.cpp | 90 |
| large-file.cpp:0:0:0:0 | large-file.cpp | 119 |
| short-file.cpp:0:0:0:0 | short-file.cpp | 3 |

View File

@@ -1 +1 @@
Summary/LinesOfCodePerFile.ql
Summary/LinesOfCodePerFile.ql

View File

@@ -0,0 +1 @@
Summary/LinesOfUserCode.ql

View File

@@ -0,0 +1 @@
Summary/LinesOfUserCodePerFile.ql

View File

@@ -1 +0,0 @@
Summary/LinesPerFile.ql