10000 Merge pull request #19616 from github/aibaars/rust-fix-stats · github/codeql@4de3817 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4de3817

Browse files
authored
Merge pull request #19616 from github/aibaars/rust-fix-stats
Rust: restrict line and file counts to include only extracted source files
2 parents ae4a425 + 5c21c01 commit 4de3817

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rust/ql/src/queries/summary/NumberOfFilesExtractedWithErrors.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import codeql.files.FileSystem
1212

13-
select count(File f |
13+
select count(ExtractedFile f |
1414
exists(f.getRelativePath()) and
1515
not f instanceof SuccessfullyExtractedFile
1616
)

rust/ql/src/queries/summary/Stats.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ int getLinesOfCode() { result = sum(File f | f.fromSource() | f.getNumberOfLines
3535
* Gets a count of the total number of lines of code from the source code directory in the database.
3636
*/
3737
int getLinesOfUserCode() {
38-
result = sum(File f | exists(f.getRelativePath()) | f.getNumberOfLinesOfCode())
38+
result = sum(ExtractedFile f | exists(f.getRelativePath()) | f.getNumberOfLinesOfCode())
3939
}
4040

4141
/**

0 commit comments

Comments
 (0)
0