Skip to content

Commit

Permalink
Merge pull request #18491 from hvitved/rust/ql-test-recurse
Browse files Browse the repository at this point in the history
Rust: Include nested `.rs` files in `codeql test run`
  • Loading branch information
redsun82 authored Jan 15, 2025
2 parents 3ceec93 + e60468e commit f62a3ac
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rust/extractor/src/qltest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ path = "main.rs"
}

fn set_sources(config: &mut Config) -> anyhow::Result<()> {
let path_iterator = glob("*.rs").context("globbing test sources")?;
let path_iterator = glob("**/*.rs").context("globbing test sources")?;
config.inputs = path_iterator
.collect::<Result<Vec<_>, _>>()
.context("fetching test sources")?;
Expand Down
2 changes: 2 additions & 0 deletions rust/ql/test/extractor-tests/File/File.expected
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
| a_file.rs:0:0:0:0 | a_file.rs | fromSource: yes |
| another_file.rs:0:0:0:0 | another_file.rs | fromSource: yes |
| lib.rs:0:0:0:0 | lib.rs | fromSource: yes |
| nested.rs:0:0:0:0 | nested.rs | fromSource: yes |
| nested/file.rs:0:0:0:0 | nested/file.rs | fromSource: yes |
1 change: 1 addition & 0 deletions rust/ql/test/extractor-tests/File/nested.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mod file;
Empty file.

0 comments on commit f62a3ac

Please sign in to comment.