(items: list[dict])
| 2636 | |
| 2637 | |
| 2638 | def fmt_relation_issues(items: list[dict]): |
| 2639 | if not items: |
| 2640 | print("✅ 没有发现非标准关系类型([[X|RELATION]] 都在白名单中)") |
| 2641 | return |
| 2642 | print(f"⚠️ 发现 {len(items)} 处非标准关系类型:\n") |
| 2643 | print(f" (标准关系白名单:{sorted(RELATION_TYPES)})\n") |
| 2644 | for it in items: |
| 2645 | print(f" {it['path']}:{it['line']} ({it['title']})") |
| 2646 | print(f" 引用: {it['raw']}") |
| 2647 | print(f" 问题: {it['bad_relation']!r} 不在白名单") |
| 2648 | print(f" 修复: {it['suggestion']}") |
| 2649 | print() |
| 2650 | |
| 2651 | |
| 2652 | def fmt_graph(data: dict): |