Prerequisites
Reproduction url
https://github.com/WooWan/knip-reporter-reproduction
Reproduction access
Description of the issue
When only one issue type is reported (e.g. knip --include=dependencies or --strict), the symbols (default) and compact reporters drop the type title and count (e.g. Unused dependencies (2)). With multiple types they're shown.
$ knip
Unused dependencies (2) # title + count shown
chokidar package.json:15:6
execa package.json:16:6
$ knip --include=dependencies --strict
chokidar package.json:15:6 # title + count missing
execa package.json:16:6
This is gated on reportMultipleGroups (symbols.ts:8, compact.ts:11), so it may be intentional. Even so, always showing the title and count would be convenient: the count is useful at a glance (CI logs, PR comments), and output stays consistent so --include/--strict doesn't silently change the report's shape.
Proposal
Always render the type title and count, or add an option to opt into it for single-type runs.
Prerequisites
Reproduction url
https://github.com/WooWan/knip-reporter-reproduction
Reproduction access
Description of the issue
When only one issue type is reported (e.g.
knip --include=dependenciesor--strict), thesymbols(default) andcompactreporters drop the type title and count (e.g.Unused dependencies (2)). With multiple types they're shown.This is gated on
reportMultipleGroups(symbols.ts:8,compact.ts:11), so it may be intentional. Even so, always showing the title and count would be convenient: the count is useful at a glance (CI logs, PR comments), and output stays consistent so--include/--strictdoesn't silently change the report's shape.Proposal
Always render the type title and count, or add an option to opt into it for single-type runs.