Skip to content

coverage_report: print the object-type name next to each type code in the error histogram #16

Closed

Description

@DrunkOnJava

Symptom

examples/coverage_report.rs ends with:

Error histogram by type code (top 10):
  type_code 1     → 25 errors
  type_code 53    → 21 errors
  type_code 69    → 20 errors

Readers have to know that 1 is TEXT, 53 is STYLE, 69 is VPORT. examples/dump_decoded_entities.rs already prints kind=Style for the same entities.

Fix

In the histogram loop (examples/coverage_report.rs around line 115) map the code through dwg::object_type::ObjectType::from_code(tc).short_label() and print it beside the code:

  type_code 53  STYLE     → 21 errors

Keep the column layout stable (the CI coverage-smoke job parses decoded_ratio, not this block, but keep it tidy). No behavior change anywhere else.

Done when

  • Output shows the label; cargo run --release --example coverage_report -- <dir> still exits 0 and the decoded_ratio line is unchanged.
  • cargo fmt / clippy -D warnings clean.

Activity

  1. added
    good first issue
    on Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions