INNER CODE UNIT · Python
write_sanity_report
crocs-muni/javacard-curated-list · scripts/process_curated_list.py:485
def write_sanity_report(entries, flagged):
by_kind = {}
for e in flagged:
for kind, _ in e["issues"]:
by_kind[kind] = by_kind.get(kind, 0) + 1
lines = []
lines.append("# JavaCard Curated List — Sanity Check Report")
lines.append("")
lines.append(f"- Total entries checked: **{len(entries)}**")
lines.append(f"- Entries with at least one issue: **{len(flagged)}**")
lines.append("")
if by_kind:
lines.append("## Issues by type")
lines.append("")
lines.append("| Issue type | Count |")
lines.append("|---|---|")