Files
codeql/ruby/ql/src/queries/diagnostics/ExtractionErrors.ql
2021-10-15 11:47:28 +02:00

19 lines
517 B
Plaintext

/**
* @name Extraction errors
* @description List all extraction errors for files in the source code directory.
* @kind diagnostic
* @id rb/diagnostics/extraction-errors
*/
import ruby
import codeql.ruby.Diagnostics
/** Gets the SARIF severity to associate an error. */
int getSeverity() { result = 2 }
from ExtractionError error, File f
where
f = error.getLocation().getFile() and
exists(f.getRelativePath())
select error, "Extraction failed in " + f + " with error " + error.getMessage(), getSeverity()