nccgroup / sobelow

Security-focused static analysis for the Phoenix Framework
Apache License 2.0
1.66k stars 92 forks source link

Colour the output only if `IO.ANSI.enabled?() == true` #82

Open hauleth opened 3 years ago

hauleth commented 3 years ago

This will greatly help with situations when you want to pipe the output to another command for processing. Right now the output is polluted with escape codes that are hard to process.

OldhamMade commented 3 years ago

The addition of a --no-color flag would be welcome also, to forcefully disable color use.

hauleth commented 3 years ago

@OldhamMade you can use NO_COLOR=1 environment variable. IO.ANSI understands that and will automatically set the IO.ANSI.enabled?() to false.