Support for pylint/pyflakes/flake8?

已回答
Are there any plans to support pylint/pyflakes/flake8 as inspections in addition to pep8 which is currently available?
8
Avatar
Permanently deleted user

I don't understand at all. There is a well-known community tool `flake8`, free, open-source, and available through pypi/pip. A lot of projects use this tool in their CI systems. Why pycharm-flake8 plugin still does not exist??? 

Moreover, as written before, PyCharm's embed linting feature does not detect a lot of bugs/issues/tips, already detected by flake8.

I know just one so-so way to use flake8 in PyCharm: use External Tools. There is an article: https://foxmask.trigger-happy.eu/post/2016/02/17/pycharm-running-flake8/ , and here is my config:

 

8
Avatar
Permanently deleted user
Here is my use case. I do lot of coding in PyCharm, sometimes i have to fix issues and do things in random text editors, including nano. Our code goes through continuous integration servers, and we run flake8 on the servers. Flake8 currently flags a ton of stuff that Pycharm doesnt flag by default (W293, W291, E501 etc) , hence, i'd like to have an easy option of running flake8 ( as well as pycharms own live-checking ) from within the IDE so i dont have to roundtrip through buildservers, jump to commandline etc to do this.

Someone keeps a gist sort of up to date here for this : https://gist.github.com/jsmits/9033655
3
Avatar
Permanently deleted user
"PyCharm covers all the features of PyFlakes and a lot of features of PyLint"

Where can I find information on how to configure these features on per file/scope/line basis (comments in the source code) similarly to how the original tools can be configured?
0
Inspections are configured in File | Settings | Inspections, see Code Inspection. You can suppress inspection warnings using the quick fix menu on the highlighted code, see Suppressing Inspections.
0
Avatar
Permanently deleted user
The problem with this is that organizations can extend pylint, which gives it value. Even if we could add pycharm-specific inspections, I'd fight against it as I don't like to invest in closed-source-specific solutions. :-(
0
PyCharm Community Edition, that includes most inspections and refactorings is in fact open-source. We may consider adding a generic mechanism for adding custom code inspections as we did for pep8.
0

While I find PyCharm a wonderful tool, I can hardly understand its inability to integrate ubiquitous Python linting tools. The reality is that PyCharm internal linting support will never be able to cover for all pep8/flake8/pylint/pycodestyle linters, is just impossible to keep up with them. That is one reason why I prefer to use Atom when I do not have to perform debugging.

0

We have similar request on YouTrack: https://youtrack.jetbrains.com/issue/PY-8192. Feel free to vote for it and leave suggestions in comments.

0

I've wrote a library that offer - kind of - native flake8 integration with pycharm. The library work by pretending to be a pylint executable. It accept pylint arguments and translate it to flake8 counterpart. Similarly it translate flake8 output to equivalent pylint output.

Result is native flake8 support.

https://gitlab.com/ramast/flake8-for-pycharm/

0

The problem for us is that however good PyCharm's built-in checking, if it does not use the same config files to configure checking that pyflakes uses, then it does not cover "all the features of PyFlakes". When you need to work in a team with people using different editors, you need to use the standard linting tools, end of story.

0
Currently we do not plan to integrate PyLint and PyFlakes. PyCharm covers all the features of PyFlakes and a lot of features of PyLint. In PyCharm 3.0 we will add more PyLint-like inspections, see our development roadmap.
-1

请先登录再写评论。