Make use of rich for formatters
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.3k
- Forks
- 836
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 1
Description
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 👍.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading screen.py and the Rich syntax documentation linked in the issue to understand the existing formatter output and available syntax features. The work is done when the screen formatter uses rich.syntax to display code snippets with line numbers and syntax formatting, with any other suitable formatters considered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100