mirror of
https://github.com/github/codeql.git
synced 2026-04-22 23:35:14 +02:00
Rust: add ExtractionStep::CrateGraph
This commit is contained in:
@@ -83,6 +83,7 @@ pub enum ExtractionStepKind {
|
||||
LoadSource,
|
||||
Parse,
|
||||
Extract,
|
||||
CrateGraph,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
@@ -128,6 +129,10 @@ impl ExtractionStep {
|
||||
)
|
||||
}
|
||||
|
||||
pub fn crate_graph(start: Instant) -> Self {
|
||||
Self::new(start, ExtractionStepKind::CrateGraph, None)
|
||||
}
|
||||
|
||||
pub fn load_source(start: Instant, target: &Path) -> Self {
|
||||
Self::new(
|
||||
start,
|
||||
|
||||
@@ -244,7 +244,11 @@ fn main() -> anyhow::Result<()> {
|
||||
if let Some((ref db, ref vfs)) =
|
||||
extractor.load_manifest(manifest, &cargo_config, &load_cargo_config)
|
||||
{
|
||||
let before_crate_graph = Instant::now();
|
||||
crate_graph::extract_crate_graph(extractor.traps, db, vfs);
|
||||
extractor
|
||||
.steps
|
||||
.push(ExtractionStep::crate_graph(before_crate_graph));
|
||||
let semantics = Semantics::new(db);
|
||||
for file in files {
|
||||
match extractor.load_source(file, &semantics, vfs) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
| Elements extracted | 405 |
|
||||
| Elements extracted | 406 |
|
||||
| Elements unextracted | 0 |
|
||||
| Extraction errors | 0 |
|
||||
| Extraction warnings | 7 |
|
||||
|
||||
Reference in New Issue
Block a user