Skip to content

Conversation

marcosinger
Copy link
Contributor

Description

Add a flag -color to support colored output. This is only available for text output format.
Using the gookit/color to have support for a range of OS.

Basic Examples

Text format without color flag on

format-text-without-color

Using other format than -fmt=text

It's not allowed to use that flag with other format types

format-html-with-color

No Issues

The Summary and Issues sections are presented colored

no-issues

With Issues

The file path is presented colored and also the Issues number is red when it's more than zero

High severity

example-high

Medium severity

example-medium

Low severity

example-low

Other examples

Running full example using different apps

Terminal App (Mac)

full-terminal

iTerm (Mac)

full-iterm

closes #456

Basic color support for text format. For now, only the "Summary" title
and "Issues" section has color
Given an issue, the file path is painted based on its severity.
We're using the following rules: high is red, medium is yellow and
low is simple black & white
It's only valid for text format
@marcosinger
Copy link
Contributor Author

@ccojocar It's ready for review. Let me know what you think about it and feel free to add any suggestions. Thanks!

Copy link
Member

@ccojocar ccojocar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this nice contribution! It looks great!

@ccojocar ccojocar merged commit 656691b into securego:master Apr 14, 2020
@ccojocar
Copy link
Member

I had to use the latest version of gookit/color package in order to get it working with tmux. Also I removed the flag and turned on by default. See #462

Thanks again for your contribution.

@marcosinger marcosinger deleted the feature-add-color-option-on-text-format branch April 14, 2020 16:21
@marcosinger
Copy link
Contributor Author

@ccojocar nice! I just left a comment on #462 about the color condition, see here. I could open an issue as well if that makes more sense.

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

Successfully merging this pull request may close these issues.

Feature request: support colored output
2 participants