I have a django project in gitlab. In one of my CI pipelines, I use pylint to generate a badge with the given score. Also, pylint generate an issues report in txt format. Is there a way to generate this report in html to be publish as an artifact?
Unfortunately, as of pylint-1.7 the html output feature has been removed.
https://docs.pylint.org/en/1.8/whatsnew/1.7.html#removed-changes
IMO this is bad, because it prevents users from upgrading to 1.8 unless they want to write their own html page generation code. I'd like to see that feature restored, or made available in some other form (something that translates the json into html similarly to what was previously generated.)
Unless that happens we're stuck with the older version for the forseable future.
According to https://docs.pylint.org/en/1.6.0/output.html, you simply want to issue
pylint --output-format=html
but, upon running said command I run into https://github.com/PyCQA/pylint/issues/1388 - hopefully an update will solve it.
there is pylint-json2html (github: Exirel/pylint-json2html, pypi: pylint-json2html)
example usage:
$ pylint my_package | pylint-json2html -o pylint.html
Provided that you configure your Pylint config file with:
[REPORTS]
output-format=json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With