lordmauve / flake8-html

Generate HTML reports of flake8 violations
Other
52 stars 17 forks source link

Make the `find_severity` API official #20

Open smarie opened 3 years ago

smarie commented 3 years ago

Hi, thanks so much for this nice plugin !

I recently created a commandline tool to generate badges for tests, coverage and flake8: https://smarie.github.io/python-genbadge/

Concerning flake8, it plays very nicely with the html pages generated by your plugin, as you can see by clicking on the badge in the genbadge doc.

In order to aggregate the number of issues by severity (the 3 color codes in the html report), I have to use the flake8-html internal API, more precisely flake8_html.plugin.find_severity: https://github.com/smarie/python-genbadge/blob/main/genbadge/utils_flake8.py#L45

Indeed, flake8 by itself does not provide such severity levels. For the sake of longer-term maintenance, would it be possible to secure this function and expose it at package level (in the __init__.py) so that it can continue to be available even if the internal structure changes ?

(I proposed a PR for this)

Thanks in advance !