twisted / twistedchecker

twistedchecker is a tool to automatically verify code against the Twisted coding standard.
MIT License
9 stars 13 forks source link

Switch to being a flake8 plugin instead of using pylint #122

Open habnabit opened 7 years ago

habnabit commented 7 years ago

pyflakes is already part of the twisted workflow, as I understand it, and flake8 can be configured to not complain about twisted's disagreements with PEP8 style. flake8 is a nice general framework that checkers can be added to without much issue.

I already maintain one flake8 plugin: ebb-lint. I'm going to see what would be involved in doing this conversion, but I think the result would be more maintainable.

wsanchez commented 7 years ago

Perhaps better would be to provide a set of separate flake8 plugins, as some of TwistedChecker's functionality overlaps with other flake8 plugins.

For example, I think flake8_docstrings does some of what the docstrings checker does.

adiroiban commented 6 years ago

I plan to replace a big part of twistedchecker functionality with pycodestyle (https://github.com/PyCQA/pycodestyle/compare/master...adiroiban:configurable-blank-lines)

I hope that after experimenting with it, we can push a change upstream to allow some configuration for blank lines.

Beside the blank_lines, the Twisted code is pep8 compatible... so we can use it without having to ignore it.

There are a couple of checks in twistedchecker, which are not covered by pycodestyle (ex variable names)

So it would help if here we can list what plugins can we use to replace existing twistechecker checks.

adiroiban commented 6 years ago

And twistedchecker is already using pycodestyle https://github.com/twisted/twistedchecker/blob/master/twistedchecker/checkers/pycodestyleformat.py

But I prefer to have it as an external tools so that we can use the "diff" functionality

adiroiban commented 6 years ago

See pycodestyle issue here https://github.com/PyCQA/pycodestyle/issues/732 :)