mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
C++: Update query to latest spec.
This commit is contained in:
committed by
GitHub
parent
f75b969ffc
commit
fa3ac30894
@@ -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())
|
||||
|
||||
@@ -1 +1 @@
|
||||
| 122 |
|
||||
| 93 |
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user