Files
codeql/rust/autobuild/src/main.rs
Paolo Tranquilli 485586f780 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.
2024-12-20 14:12:41 +01:00

14 lines
415 B
Rust

use codeql_extractor::autobuilder;
use std::path::PathBuf;
fn main() -> std::io::Result<()> {
let database = std::env::var("CODEQL_EXTRACTOR_RUST_WIP_DATABASE")
.expect("CODEQL_EXTRACTOR_RUST_WIP_DATABASE not set");
autobuilder::Autobuilder::new("rust", PathBuf::from(database))
.include_extensions(&[".rs"])
.exclude_globs(&["**/.git"])
.size_limit("5m")
.run()
}