lordmauve / flake8-html

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

CI and config file support #8

Closed 7oi closed 7 years ago

7oi commented 7 years ago

Config file support

I wanted this to run with django-jenkins flake8 task, but as it required cli options it was quite impossible. So I added config file parsing of the most common config files (setup.cfg, tox.ini, .flake8) to accommodate that need.

CI support

When running the django-jenkins flake8 task with flake-html it would render a report, but the format was off. It generates a report from the out stream from flake8 and the outstream was in the format {file} has issues: high: x medium: x for each file while I needed a pep8 report which goes: {file}:{error line}:{error column} {error code} {error text} for each error.

So I added the option to output a pep8 report.

Results

lordmauve commented 7 years ago

It looks like this change hasn't been tested on Python 3, which is why tests are failing.

Also, please bump the version to 0.4 rather than 0.3.1.

I might have some minor style comments when I did more into the code. In principle though this sounds like a good change.

7oi commented 7 years ago

Good catch. It seems that I imported the old python 2 ConfigParser rather than the imporved configparser (the lower-casing makes all the difference), which works with both python 2 and 3. I fixed that, trimmed away some unnecessary things and also bumped the version to 0.4.

lordmauve commented 7 years ago

Also, I notice a few lines are longer than 79 characters and therefore cause flake8 warnings. flake8-html should be flake8 clean, of course :)

7oi commented 7 years ago

Of course! It seemed that one line was longer than it should be. I fixed that. :)

lordmauve commented 7 years ago

I will release to PyPI when I can get in front of my laptop.

lordmauve commented 7 years ago

Released 0.4.0.