Reputation: 61
I'm trying to integrate pylint with pyCharm, but I want it to be an online tool.
What do I mean ? I want it to detect errors and checking code standards when I write the code. Until now, I have done it by clicking "Tools --> External Tools --> pylint". There is an option to do this ? or maybe call the Pylint when I run the script ?
Thanks.
Upvotes: 0
Views: 3757
Reputation: 3129
Roberto Leinardi has recently created a pylint plugin for pycharm which really works and integrates well into the IDE:
Easy to install from the repositories, full instructions under: https://github.com/leinardi/pylint-pycharm
I have a short yet a happy experience with it so far! Kudos to Roberto.
Upvotes: 0
Reputation: 479
I am just going through this myself - I think there are some earlier answers about setting up an external tool to produce a report, but this exists and sounds like exactly what you want.
Pylint-Pycharm is a wrapper around Pylint that formats file paths in the Pylint output in a way that Pycharm can parse. This allows you to go to finding directly by clicking on the provided link.
The tool accepts the directory of a virtual environment as parameter and requires the paths of one or more Python files as input. The Python files/modules and all additional command line parameters are handed over to Pylint.
To configure as an 'external tool' in Pycharm (after you've run Setup.py):
command: pylint-pycharm
arguments: $FilePath$
[you can also pass in a virtualenv with --venv=, and other params for pylint such as your own pylintrc file]
directory: $FileDir$
Now the messages contain a link to the line in question.
To use straight pylint, configure per these instructions:
https://www.mantidproject.org/How_to_run_Pylint
Upvotes: 1
Reputation: 619
Under Run
-> Edit Configurations...
you can see the Configuration on the right Side. At the Bottom is a Section called Before launch: Activate tool window
where you can hit the green plus Button and configure pylint to be executed before the run.
Upvotes: 1