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
Hints
cmd/go-semver-audit/main_test.go — extend stub-based CLI tests for JSON and HTML with unused: true.
Ensure
-unusedresults show up in JSON and HTML outputsContext
I ran the CLI with
-unusedand-json/-htmlflags 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
-unusedis passed, both JSON and HTML outputs should include the unused dependency list.Scope / non-goals
UnusedDeps.Acceptance criteria
unused_dependencieswhen-unusedis set.-unusedis set.Hints
cmd/go-semver-audit/main_test.go— extend stub-based CLI tests for JSON and HTML withunused: true.