Some languages have simple, one line import xyz_lib or use abc_mod type of statements, while others like Rust and Go can have nested import statements.
Terraform has a similar problem. We need to extract source only if it's nested inside required_providers section and should never be read if it's inside module section. E.g.
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.59"
}
time = {
source = "hashicorp/time"
version = "~> 0.7.2"
}
github = {
source = "integrations/github"
version = "~> 4.14"
}
}
Reports are missing a lot of refs and packages due to this limitation. Review all munchers on completion.
Some languages have simple, one line
import xyz_lib
oruse abc_mod
type of statements, while others like Rust and Go can have nested import statements.E.g. Go
or Rust (https://github.com/matrix-org/matrix-rust-sdk/blob/main/crates/matrix-sdk/src/client.rs)
Terraform has a similar problem. We need to extract
source
only if it's nested insiderequired_providers
section and should never be read if it's insidemodule
section. E.g.Reports are missing a lot of refs and packages due to this limitation. Review all munchers on completion.
Related issues: #8, #7