Merge pull request #18491 from hvitved/rust/ql-test-recurse

Rust: Include nested `.rs` files in `codeql test run`
This commit is contained in:
Paolo Tranquilli
2025-01-15 10:10:55 +01:00
committed by GitHub
4 changed files with 4 additions and 1 deletions

View File

@@ -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")?;

View File

@@ -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 |

View File

@@ -0,0 +1 @@
mod file;