mirror of
https://github.com/github/codeql.git
synced 2026-04-23 15:55:18 +02:00
Rust: Correct extraction errors query to output only errors.
This commit is contained in:
@@ -48,9 +48,9 @@ class Diagnostic extends @diagnostic {
|
||||
string toString() { result = this.getMessage() }
|
||||
}
|
||||
|
||||
/** A diagnostic relating to a particular error in extracting a file. */
|
||||
/** A diagnostic that is error severity. */
|
||||
class ExtractionError extends Diagnostic {
|
||||
ExtractionError() { this.getTag() = "parse_error" }
|
||||
ExtractionError() { this.getSeverity() = 40 }
|
||||
}
|
||||
|
||||
/** A diagnostic that is warning severity. */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import codeql.rust.Diagnostics
|
||||
import codeql.files.FileSystem
|
||||
|
||||
/** Gets the SARIF severity to associate an error. */
|
||||
/** Gets the SARIF severity to associate with an error. */
|
||||
int getSeverity() { result = 2 }
|
||||
|
||||
from ExtractionError error, File f
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
| does_not_compile.rs:2:6:2:5 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 |
|
||||
| does_not_compile.rs:2:9:2:8 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 |
|
||||
| does_not_compile.rs:2:13:2:12 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 |
|
||||
| does_not_compile.rs:2:21:2:20 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 |
|
||||
| does_not_compile.rs:2:26:2:25 | expected SEMICOLON | Extraction failed in does_not_compile.rs with error expected SEMICOLON | 2 |
|
||||
| does_not_compile.rs:2:32:2:31 | expected field name or number | Extraction failed in does_not_compile.rs with error expected field name or number | 2 |
|
||||
|
||||
Reference in New Issue
Block a user