Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Make errors more visible #22

Open
johanbrandhorst opened this issue Feb 19, 2020 · 1 comment
Open

Make errors more visible #22

johanbrandhorst opened this issue Feb 19, 2020 · 1 comment

Comments

@johanbrandhorst
Copy link

Specifically, reporting errors is lacking a bit at the moment. golicense exits with status 1 correctly in the case of a disallowed or unknown license, but it's really hard to get a quick overview of what package failed if you have a lot of dependencies, since it doesn't print something like a summary when it's finished. It requires the user to go back in the terminal/log and look for an emoji/special colour to find the offending package (is there a better way?). This can be a tedious exercise when logs are several thousand lines long and you don't have a key on your keyboard for \u26a0 (⚠).

It doesn't help that golicense seems to detect when a tty is present and switch to plain mode, so you can't run something like golicense | ripgrep '\x{26a0}', as far as I can tell.

I propose adding a summary at the end for failing packages.

@johanbrandhorst
Copy link
Author

I can see the XLSXOutput already implements a summary, so I'm simply going to implement a summary for the terminal output too.

Ref: https://github.com/mitchellh/golicense/blob/master/output_xlsx.go#L50-L155

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant