Replace findings list with a tree; filter ESD/PI false positives.

PE-ESD-001 only on J* connector–IC nets (skip NC, unconnected, VSYS/GND/3V3).
PE-PI-001 treats any capacitor on the rail, including KiCad slash prefixes, as
decoupling. Sort findings ERROR then WARNING then INFO, then RULE/RISK/REVIEW/INFO.
Report sidebar is a collapsed expand-on-click tree instead of an all-open list.
GET /report and complete_findings fail-soft and sort the same way.
This commit is contained in:
2026-09-20 10:03:50 +02:00
parent 342792df2d
commit bee6369c1d
13 changed files with 628 additions and 137 deletions
+7 -5
View File
@@ -67,12 +67,14 @@ def build_hierarchy(
ref_block[g.ref] = bid
else:
for net in graph.nets.values():
if net.net_type.value != "power":
ntype = getattr(net.net_type, "value", net.net_type)
if str(ntype) != "power":
continue
ics = [
p.component_ref for p in net.pins
if (graph.components.get(p.component_ref)
and graph.components[p.component_ref].component_type.value == "ic")
and str(getattr(graph.components[p.component_ref].component_type, "value",
graph.components[p.component_ref].component_type)) == "ic")
]
if not ics:
continue
@@ -103,7 +105,7 @@ def build_hierarchy(
break
comps.append(HierarchyComponent(
ref=ref,
component_type=comp.component_type.value,
component_type=str(getattr(comp.component_type, "value", comp.component_type)),
pins=pins,
nets=nets,
block_id=bid,
@@ -120,7 +122,7 @@ def build_hierarchy(
break
hnets.append(HierarchyNet(
name=name,
net_type=net.net_type.value,
net_type=str(getattr(net.net_type, "value", net.net_type)),
components=refs,
block_id=bid,
))
@@ -131,7 +133,7 @@ def check_hierarchy(graph: DesignGraph, plan: FunctionalGroupsReport | None = No
"""FACT: IC pin with an empty net. Skip unnamed power-flags."""
out: list[Finding] = []
for ref, comp in sorted(graph.components.items()):
if comp.component_type.value != "ic":
if str(getattr(comp.component_type, "value", comp.component_type)) != "ic":
continue
dangling = [str(n) for n, net in comp.pins.items() if not (net or "").strip()]
if not dangling: