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.
Deferred from PR #1107 review.
Original reviewer comment: #1107 (comment)
Context: Greptile flagged that several handlers in
crates/codegraph-core/src/extractors/verilog.rsusenode.child(i)?insideforloops. The?operator exits the entire loop on the firstNoneinstead of continuing past it. In practice this is harmless today becausechild_countalways returns valid indices, butif let Some(child) = node.child(i)is more defensively correct and consistent withhandle_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.