Closed mobiuscog closed 3 years ago
Had you thought about using a "cli table" formatting library, instead of rolling our own? I haven't used any, but here's a few I found (in no particular order): https://crates.io/crates/term-table https://docs.rs/cli-table/0.4.5/cli_table/ https://crates.io/crates/prettytable-rs
I'm not strongly against writing our own table format logic, but it seems like it is always "more trouble" in the long run than using a library.
I had tried a few, and they either failed on supporting differing cell counts, or didn't handle the ansi_term formatting correctly. After spending a few hours trying to make them work (I tried prettytable-rs and comfy-table in the main), I decided the specific need was likely straightforward to approach, and so took that approach. If there is a suitable library that can re-create the look/feel given in the issue, I would gladly look again.
Sorry for the slow response. Thanks for the PR! Please holler if any issues arise.
Added tabular display of vulnerabilities and used suggested format where possible to be consistent.
This pull request makes the following changes: Adds tables to view Adds coloring based on vulnerability level, consistent with Nancy. Adds --no-color (-m) option
It relates to the following issue #s: