Skip to content

Report summary: surface warnings + errors at top of HTML, end of text reports #440

Description

@ascheman

Motivation

When a HSC run produces many findings spread across files and checker
categories, it's easy to lose track of "what actually broke". A
glance-able summary of the explicit warnings and errors would let me
triage immediately without scrolling.

HSC operates on HTML (the source isn't always AsciiDoc), so this issue
is scoped to the HTML report and the text reports. Back-referencing the
original AsciiDoc / Markdown / … source (e.g. line numbers) is a
separate concern and tracked elsewhere.

Proposal

Text report (Console / Logger / JUnit XML)

Append a summary block at the end of the textual output that lists,
per category. Warnings come first; errors come last so they're closest
to where the terminal cursor lands after the run:

==================== Summary ====================
Warnings (2):
  README.adoc
    BrokenHttpLinksChecker: 308 Permanent Redirect → https://…
  …

Errors (3):
  src/docs/manual/30_gradle-plugin.adoc
    BrokenCrossReferencesChecker: anchor #sec:foo missing
  …
=================================================

HTML report

Add a summary section at the top of the report page that lists
issues grouped by severity (errors first, warnings below), each entry
linking via #anchor to the detailed finding further down. This way the
existing detail sections stay as they are; the top just acts as a
table of contents focused on what's actionable.

A minimal version: collapsible details, expanded by default for errors,
collapsed for warnings.

Acceptance criteria

  • Text reports (Console, Logger, JUnit-as-text where applicable)
    end with a ==== Summary ==== block where warnings are listed
    first and errors at the very bottom, each entry showing source
    file + identifier and the finding message.
  • HTML report has a "Summary" section as the first content under the
    page title, with errors and warnings each as a list of links
    pointing at #… anchors of the existing detail sections.
  • Existing detail sections still render unchanged.

Related

  • Full file path display + clickable jump-to anchor for findings on
    the HTML report — I searched issues and stashes and couldn't find
    an existing ticket. If the wording is remembered I can look again;
    otherwise this is a candidate for its own follow-up issue rather
    than being bundled into this one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions