Skip to content

follow-up: replace ? operator in for-loops with if let Some in verilog extractor #1118

@carlos-alm

Description

@carlos-alm

Deferred from PR #1107 review.

Original reviewer comment: #1107 (comment)

Context: Greptile flagged that several handlers in crates/codegraph-core/src/extractors/verilog.rs use node.child(i)? inside for loops. The ? operator exits the entire loop on the first None instead of continuing past it. In practice this is harmless today because child_count always returns valid indices, but if let Some(child) = node.child(i) is more defensively correct and consistent with handle_package_import / handle_include_directive. A sweep would touch several handlers — this issue tracks doing the cleanup as one cohesive PR rather than mixing it with #1107.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upDeferred work from PR reviews that needs tracking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions