Rust: Add extraction error consistency query

This commit is contained in:
Tom Hvitved
2024-09-30 10:24:41 +02:00
parent a017f92b78
commit bafef791f7
7 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
import codeql.rust.Diagnostics
query predicate extractionError(ExtractionError ee) { any() }

View File

@@ -0,0 +1 @@
| gen_expr_stmt.rs:6:13:6:12 | expected SEMICOLON |

View File

@@ -0,0 +1 @@
| gen_if_expr.rs:12:6:12:5 | expected SEMICOLON |

View File

@@ -0,0 +1,3 @@
| gen_prefix_expr.rs:5:16:5:15 | expected SEMICOLON |
| gen_prefix_expr.rs:6:18:6:17 | expected SEMICOLON |
| gen_prefix_expr.rs:7:17:7:16 | expected SEMICOLON |

View File

@@ -0,0 +1,4 @@
| lib.rs:3:9:3:8 | expected `;` or `{` |
| lib.rs:3:9:3:8 | expected an item |
| lib.rs:3:21:3:20 | expected BANG |
| lib.rs:3:21:3:20 | expected `{`, `[`, `(` |

View File

@@ -0,0 +1,7 @@
| test.rs:26:35:26:34 | expected `,` |
| test.rs:26:35:26:34 | missing type for function parameter |
| test.rs:26:37:26:36 | missing type for function parameter |
| test.rs:40:38:40:37 | expected `,` |
| test.rs:40:38:40:37 | missing type for function parameter |
| test.rs:40:40:40:39 | missing type for function parameter |
| test.rs:122:43:122:42 | expected type |

View File

@@ -0,0 +1,6 @@
| does_not_compile.rs:2:6:2:5 | expected SEMICOLON |
| does_not_compile.rs:2:9:2:8 | expected SEMICOLON |
| does_not_compile.rs:2:13:2:12 | expected SEMICOLON |
| does_not_compile.rs:2:21:2:20 | expected SEMICOLON |
| does_not_compile.rs:2:26:2:25 | expected SEMICOLON |
| does_not_compile.rs:2:32:2:31 | expected field name or number |