mirror of
https://github.com/github/codeql.git
synced 2026-05-04 05:05:12 +02:00
Rust: support glob members in workspaces
This commit is contained in:
4
rust/ql/integration-tests/workspace-with-glob/Cargo.toml
Normal file
4
rust/ql/integration-tests/workspace-with-glob/Cargo.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[workspace]
|
||||
members = [ "*" ]
|
||||
exclude = [ "other" ]
|
||||
resolver = "2"
|
||||
@@ -0,0 +1,7 @@
|
||||
[package]
|
||||
name = "exe"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
lib = { path = "../lib" }
|
||||
@@ -0,0 +1,5 @@
|
||||
use lib::hello;
|
||||
|
||||
fn main() {
|
||||
hello();
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "lib"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
@@ -0,0 +1,3 @@
|
||||
pub fn hello() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "other"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
@@ -0,0 +1,3 @@
|
||||
exe/src/main.rs
|
||||
lib/src/lib.rs
|
||||
other/src/lib.rs
|
||||
10
rust/ql/integration-tests/workspace-with-glob/steps.expected
Normal file
10
rust/ql/integration-tests/workspace-with-glob/steps.expected
Normal file
@@ -0,0 +1,10 @@
|
||||
| Cargo.toml:0:0:0:0 | LoadManifest(Cargo.toml) |
|
||||
| exe/src/main.rs:0:0:0:0 | Extract(exe/src/main.rs) |
|
||||
| exe/src/main.rs:0:0:0:0 | Parse(exe/src/main.rs) |
|
||||
| file://:0:0:0:0 | FindManifests |
|
||||
| lib/src/lib.rs:0:0:0:0 | Extract(lib/src/lib.rs) |
|
||||
| lib/src/lib.rs:0:0:0:0 | Parse(lib/src/lib.rs) |
|
||||
| other/Cargo.toml:0:0:0:0 | LoadManifest(other/Cargo.toml) |
|
||||
| other/src/lib.rs:0:0:0:0 | Extract(other/src/lib.rs) |
|
||||
| other/src/lib.rs:0:0:0:0 | LoadSource(other/src/lib.rs) |
|
||||
| other/src/lib.rs:0:0:0:0 | Parse(other/src/lib.rs) |
|
||||
4
rust/ql/integration-tests/workspace-with-glob/steps.ql
Normal file
4
rust/ql/integration-tests/workspace-with-glob/steps.ql
Normal file
@@ -0,0 +1,4 @@
|
||||
import codeql.rust.elements.internal.ExtractorStep
|
||||
|
||||
from ExtractorStep step
|
||||
select step
|
||||
@@ -0,0 +1,5 @@
|
||||
import pytest
|
||||
|
||||
|
||||
def test_cargo(codeql, rust, check_source_archive):
|
||||
codeql.database.create()
|
||||
Reference in New Issue
Block a user