C++: Update query to latest spec.

This commit is contained in:
Cornelius Riemenschneider
2021-03-16 09:56:38 +00:00
committed by GitHub
parent f75b969ffc
commit fa3ac30894
4 changed files with 8 additions and 3 deletions

View File

@@ -1,11 +1,11 @@
/**
* @id cpp/summary/lines-of-code
* @name Total lines of C/C++ code in the database.
* @description The total number of lines of C/C++ code across all files, including system headers and libraries. This is a useful metric of the size of a database.
* @description The total number of lines of C/C++ code across all files, including system headers, libraries and auto-generated files. This is a useful metric of the size of a database. Lines of code are all lines in a file that was seen during the build that contain code, i.e. are not whitespace or comments.
* @kind metric
* @tags summary
*/
import cpp
select sum(File f | f.fromSource() | f.getMetrics().getNumberOfLines())
select sum(File f | f.fromSource() | f.getMetrics().getNumberOfLinesOfCode())

View File

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

View File

@@ -26,10 +26,14 @@ int a06(float x) {
return (int)x;
}
/**
* This is a multi-line comment
*/
int a07(float x) {
return (int)x;
}
// this is a single-line comment
int a08(float x) {
return (int)x;
}