bandit icon indicating copy to clipboard operation
bandit copied to clipboard

Make use of rich for formatters

Open ericwb opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. Since now Bandit has a dependency on the module rich as a progress indicator, we can take further advantage of the library and use it for our output formatters.

In particular, rich.syntax can pretty print code snippets with line numbers and syntax formatting. That could look nice in our screen.py formatter.

Describe the solution you'd like Make use of rich.syntax in screen.py and possible others.

Describe alternatives you've considered n/a

Additional context https://rich.readthedocs.io/en/latest/syntax.html https://rich.readthedocs.io/en/latest/reference/syntax.html

Love this idea? Give it a 👍. We prioritize fulfilling features with the most 👍.

ericwb avatar Mar 19 '23 22:03 ericwb

rich.console also has the capability to render links in a terminal which could be useful.

ericwb avatar Mar 19 '23 22:03 ericwb