You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reachability BFS only followed 'calls' edges, so interface dispatch
targets (Go Notifier.Notify implementations), HTTP route handlers, and
middleware-wrapped functions were all falsely flagged as dead code.
On alertmanager: false positives reduced from 781 to 634 (147 functions
correctly reclassified as reachable). All 16 Notifier.Notify false
positives eliminated.
The BFS now uses _REACHABILITY_EDGE_TYPES = {calls, dispatches_to,
routes_to, wraps}, matching the call-flow edge types the slice BFS
uses for forward reachability.
Signed-off-by: jgstern-agent <josh-agent@iterabloom.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,10 @@ This changelog tracks the **tool version** (package releases). The **schema vers
67
67
68
68
### Fixed
69
69
70
+
#### Dead code analysis
71
+
72
+
-**`dead-code-maybe` BFS follows `dispatches_to`, `routes_to`, and `wraps` edges**: the reachability BFS only followed `calls` edges, so interface dispatch targets (Go `Notifier.Notify` implementations), HTTP route handlers, and middleware-wrapped functions were all flagged as dead code. On alertmanager, this fix reduced false positives from 781 to 634 (147 functions correctly reclassified as reachable), and eliminated all 16 `Notifier.Notify` false positives. The BFS now follows the same call-flow edge types that the slice BFS uses.
73
+
70
74
#### Go analyzer
71
75
72
76
-**Cross-file struct method aggregation** (WI-hobuk): the structural interface matcher iterated per-file, so methods defined in a sibling file of the same package were dropped from the struct's effective method set. Fix: aggregate `struct_method_sets` per package directory before iterating struct candidates. Two structs of the same name in *different* directories still keep disjoint method sets (preserving the INV-zomuk fix). Scope expansion from INV-zomuk.
0 commit comments