Skip to content

Ensure -unused results show up in JSON and HTML outputs #5

@devblac

Description

@devblac

Ensure -unused results show up in JSON and HTML outputs

Context

I ran the CLI with -unused and -json/-html flags and didn’t see the unused dependencies listed, even though text mode shows them. The coverage gap makes me nervous.
 

Problem

Only text output is tested for UnusedDeps. JSON and HTML paths could drop the data without anyone noticing.
 

Expected behavior

When -unused is passed, both JSON and HTML outputs should include the unused dependency list.
 

Scope / non-goals

  • No CLI behavior changes beyond ensuring the outputs render UnusedDeps.
     

Acceptance criteria

  • New tests confirm JSON output includes unused_dependencies when -unused is set.
  • New tests confirm HTML output renders the “Unused dependencies” section with entries when -unused is set.
  • No other CLI output changes.
     

Hints

  • cmd/go-semver-audit/main_test.go — extend stub-based CLI tests for JSON and HTML with unused: true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions