mfridman / tparse

CLI tool for summarizing go test output. Pipe friendly. CI/CD friendly.
MIT License
948 stars 22 forks source link

Make summary respect -smallscreen, improve package shortening #81

Closed c2h5oh closed 1 year ago

c2h5oh commented 1 year ago

Problems this solves:

  1. Summary table is often too wide for CI and -smallscreen does nothing
  2. Pattern where tests are always put in ./tests of every package they are testing results in package column in test table to be "tests" for all tests.

First problem is solved by removing common prefix from all packages tested and then wrapping the same way tests are on -smallscreen

Second one is solved treating trimming and wrapping package name in tests table just like in summary table with -smallscreen, just a bit narrower.

with -smallscreen:

before: Selection_082

after: Selection_081

without -smallscreen:

before: Selection_083

after: Selection_084

mfridman commented 1 year ago

Thanks for adding this, I was originally thinking adding a separate flag to trim the common package prefix, but this works as well.