mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
Ruby: Make similar changes to differentiate extraction errors and warnings, and mostly restore original behaviour.
This commit is contained in:
@@ -2,14 +2,15 @@
|
||||
* @id rb/summary/number-of-files-extracted-with-errors
|
||||
* @name Total number of Ruby files that were extracted with errors
|
||||
* @description The total number of Ruby code files that we extracted, but where
|
||||
* at least one extraction error occurred in the process.
|
||||
* at least one extraction error (or warning) occurred in the process.
|
||||
* @kind metric
|
||||
* @tags summary
|
||||
*/
|
||||
|
||||
import codeql.ruby.AST
|
||||
import codeql.ruby.Diagnostics
|
||||
import codeql.files.FileSystem
|
||||
|
||||
select count(File f |
|
||||
exists(ExtractionError e | e.getLocation().getFile() = f) and exists(f.getRelativePath())
|
||||
exists(f.getRelativePath()) and
|
||||
not f instanceof SuccessfullyExtractedFile
|
||||
)
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
* @id rb/summary/number-of-successfully-extracted-files
|
||||
* @name Total number of Ruby files that were extracted without error
|
||||
* @description The total number of Ruby code files that we extracted without
|
||||
* encountering any extraction errors
|
||||
* encountering any extraction errors (or warnings).
|
||||
* @kind metric
|
||||
* @tags summary
|
||||
*/
|
||||
|
||||
import codeql.ruby.AST
|
||||
import codeql.ruby.Diagnostics
|
||||
import codeql.files.FileSystem
|
||||
|
||||
select count(File f |
|
||||
not exists(ExtractionError e | e.getLocation().getFile() = f) and exists(f.getRelativePath())
|
||||
)
|
||||
select count(SuccessfullyExtractedFile f | exists(f.getRelativePath()))
|
||||
|
||||
Reference in New Issue
Block a user