cli icon indicating copy to clipboard operation
cli copied to clipboard

Reduce data volume in reports to reduce file size and make them less verbose

Open BioPhoton opened this issue 9 months ago • 3 comments

User story

As a user of the CLI or CI actions I want to have small and concise reports by default. At the moment the reports (terminal, MD, JSON) are verbose and big in file size.

Acceptance criteria

  • [ ] The terminal report of utils package needs to accept options to print a reduced report by default
  • [ ] The MD as well as JSON reports of the utils package needs to accept options to create a reduced report by default
  • [ ] The GitHub action needs to accept options to create a reduced diff report by default

Implementation details

A reduce report is defined as:

  • only failing audits listed
  • only non perfect categories listed. score 1 or targetScore reached are filtered out

Delivery plan:

  • [x] #957
  • [ ] #959
  • [x] #960
  • [x] #961
  • [x] #962
  • [ ] #964

BioPhoton avatar Mar 05 '25 09:03 BioPhoton

On refinement we had a conclusion on following proposal:

Let's open up the persist in a way that we'll allow hooking in you own reporters, in similar fashion other tools do, especially the ones that report a lot like testing or coverage (jest, vitest, cypress, ...).

I image it in a way that persist-config will be type-safe for the baked in reporters that are json and md at the moment.

  • We will not reduce them as they fulfill their use-case pretty well.
  • We can however decide to ship reduced ones, for example your proposed md-only-failing or other that make sense to keep in our codebase as they are not too specific.
  • We will create an API that will allow you to hook your own reported that can do anything it likes as it will have the same input for post-processing as baked in ones.

Reporter naming note: I'd suggest we enforce custom-* or some kind of prefix for custom reporter names, just so we don't end up in collision with baked in one.

vmasek avatar Mar 06 '25 16:03 vmasek

Closed the reduced JSON reporters proposals as they will be supported by having custom reporter to post process to whatever format or reduced data structure user desires.

Keeping the reduced markdown reporters as they can be interesting to maintain in this repo, just as options for users to see less cluttered reports.

vmasek avatar Mar 06 '25 17:03 vmasek

#990 related to code/docs coverage and the subsequent amount of issues they produce for the report and portal DB

vmasek avatar Apr 25 '25 12:04 vmasek