mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: reinstate extraction of test code
Users will still be able to opt out: * for unit tests, by providing the `cargo_cfg_overrides=-test` extractor option * for integration tests, by excluding the test files from the analysis using `paths-ignore` in the codescanning configuration file We may want to revisit whether we want a single option for both. Also further work will be needed to restrict our security queries to non-test code on the QL side.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use std::path::PathBuf;
|
||||
use codeql_extractor::autobuilder;
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let database = std::env::var("CODEQL_EXTRACTOR_RUST_WIP_DATABASE")
|
||||
@@ -7,7 +7,7 @@ fn main() -> std::io::Result<()> {
|
||||
|
||||
autobuilder::Autobuilder::new("rust", PathBuf::from(database))
|
||||
.include_extensions(&[".rs"])
|
||||
.exclude_globs(&["**/.git", "**/tests/**"])
|
||||
.exclude_globs(&["**/.git"])
|
||||
.size_limit("5m")
|
||||
.run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user