mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Ruby: Make similar changes to differentiate extraction errors and warnings, and mostly restore original behaviour.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
private import codeql.Locations
|
||||
private import codeql.util.FileSystem
|
||||
private import codeql.ruby.Diagnostics
|
||||
|
||||
private module Input implements InputSig {
|
||||
abstract class ContainerBase extends @container {
|
||||
@@ -34,3 +35,20 @@ class File extends Container, Impl::File {
|
||||
/** Holds if this file was extracted from ordinary source code. */
|
||||
predicate fromSource() { any() }
|
||||
}
|
||||
|
||||
/**
|
||||
* A successfully extracted file, that is, a file that was extracted and
|
||||
* contains no extraction errors or warnings.
|
||||
*/
|
||||
class SuccessfullyExtractedFile extends File {
|
||||
SuccessfullyExtractedFile() {
|
||||
not exists(Diagnostic d |
|
||||
d.getLocation().getFile() = this and
|
||||
(
|
||||
d instanceof ExtractionError
|
||||
or
|
||||
d instanceof ExtractionWarning
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user