Skip to content

Commit f7ee5f4

Browse files
authored
Merge pull request #18003 from github/redsun82/rust-qltest
Rust: only accept `options.yml` in QL tests
2 parents 6785b93 + b11388c commit f7ee5f4

File tree

9 files changed

+5
-9
lines changed

9 files changed

+5
-9
lines changed

rust/extractor/src/config.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,7 @@ impl Config {
6262
.ancestors()
6363
// only travel up while we're within the test pack
6464
.take_while_inclusive(|p| !p.join("qlpack.yml").exists())
65-
.flat_map(|p| {
66-
[
67-
p.join("options"),
68-
p.join("options.yml"),
69-
p.join("options.yaml"),
70-
]
71-
})
65+
.map(|p| p.join("options.yml"))
7266
.filter(|p| p.exists())
7367
.collect_vec();
7468
option_files.reverse();
File renamed without changes.

rust/ql/test/query-tests/diagnostics/ExtractedFiles.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
| main.rs:0:0:0:0 | main.rs | File successfully extracted. |
66
| my_macro.rs:0:0:0:0 | my_macro.rs | File successfully extracted. |
77
| my_struct.rs:0:0:0:0 | my_struct.rs | File successfully extracted. |
8+
| options.yml:0:0:0:0 | options.yml | File successfully extracted. |

rust/ql/test/query-tests/diagnostics/LinesOfUserCodeInFiles.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
| lib.rs:0:0:0:0 | lib.rs | 5 |
66
| does_not_compile.rs:0:0:0:0 | does_not_compile.rs | 3 |
77
| error.rs:0:0:0:0 | error.rs | 3 |
8+
| options.yml:0:0:0:0 | options.yml | 0 |

rust/ql/test/query-tests/diagnostics/SummaryStats.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
| Elements unextracted | 0 |
33
| Extraction errors | 0 |
44
| Extraction warnings | 7 |
5-
| Files extracted - total | 7 |
5+
| Files extracted - total | 8 |
66
| Files extracted - with errors | 2 |
7-
| Files extracted - without errors | 5 |
7+
| Files extracted - without errors | 6 |
88
| Inconsistencies - AST | 0 |
99
| Inconsistencies - CFG | 0 |
1010
| Inconsistencies - data flow | 0 |

0 commit comments

Comments
 (0)