flake8-vim icon indicating copy to clipboard operation
flake8-vim copied to clipboard

requesting flake8-vim integration with "hacking"

Open cjones- opened this issue 10 years ago • 3 comments

I would like to help integrate this project: https://github.com/openstack-dev/hacking

Into flake8-vim. I would love to drive this forward if you could offer advice/assistance.

-=cj

cjones- avatar Apr 11 '14 01:04 cjones-

Sure, this would be great. Please feel free to submit pull requests and I will help in any way I can.

andviro avatar Apr 11 '14 05:04 andviro

Hi Andviro;

Can you do me a favour and take a peek at the gitub link I sent in the link. Those are created as pep8 extensions. Will your plugin support those? If so how? If I can just reformat it simply, it should be a relatively wrote task.

It is just this guidance I need, then I can run with it and take it to the end.

Cheers, Chris

On Apr 10, 2014, at 10:20 PM, andviro [email protected] wrote:

Sure, this would be great. Please feel free to submit pull requests and I will help in any way I can.

— Reply to this email directly or view it on GitHub.

cjones- avatar Apr 11 '14 06:04 cjones-

Hi, Chris. IIRC, pep8 provides simple registration of check functions. I think that adding extensions to flake8-vim can be as simple as this fragment of code:

from hacking.core import this_check, that_check # select appropriate check functions that you'd like to include

p8.register_check(this_check)
p8.register_check(that_check)

etc. Pep8 checks are registered at global level, so we'll have to call this check registration code somewhere in _init_pep8(). Please select checks you think useful and try to add them. If it works out, we will add some lines to documentation and voila.

Regards, Andrew.

andviro avatar Apr 11 '14 12:04 andviro