mfridman / tparse

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

Improve markdown output formatting #75

Closed mfridman closed 2 years ago

mfridman commented 2 years ago

Partially addresses #71

This PR improves the raw markdown output

Revisit https://github.com/mfridman/tparse/issues/71#issuecomment-1149937213 for collapsable sections.

mfridman commented 2 years ago

Something that bugs me a bit is how much nested spacing the Go tool adds:

--- FAIL: Test (0.42s)

    --- FAIL: Test/test_01 (0.04s)

        --- FAIL: Test/test_01/sort (0.00s)

    cover_test.go:75: got cover: 60.8, want package "sort" cover: 10.8

What if we trimmed this by half?

Note, this does not modify the test/user output, only the --- Fail: output line

--- FAIL: Test (0.42s)
  --- FAIL: Test/test_01 (0.04s)
    --- FAIL: Test/test_01/sort (0.00s)

    cover_test.go:75: got cover: 60.8, want package "sort" cover: 10.8
mfridman commented 2 years ago

Okay, this is what a bunch of failures look like now in rendered in markdown:

This GitHub Action run, https://github.com/mfridman/tparse/actions/runs/2613571846

CleanShot 2022-07-04 at 23 25 45@2x


There is one annoyance remaining, the package header in CI on GitHub looks a bit off:

CleanShot 2022-07-04 at 23 27 17@2x

But, on local terminal it looks fine:

CleanShot 2022-07-04 at 23 28 13@2x