Configuring PyLint as an external tool in IntelliJ

PyLint is a hardcore python linting tool that can rip through nearly any code base. I find its default output is rather unhelpful, both to humans and to other tools. It’s easy to configure better, more parseable output and to pipe that through IntelliJ as an external tool. This how-to is based on IntelliJ Ultimate 14.

First, configure pylint as an external tool via (on OSX) the IntelliJ/Settings menu:

Next, add a new tool in Tools/External tools:

Configure the new tool as follows:

Name and description fields as one might expect.

The program field should point to your local pylint install. Rather than point this at a per-project venv version, I have a version of pylint installed in my local home directory (via pip install — user) and point there. The parameters (for copying and pasting: -f parseable $FileDir$) tell pylint to use an output format that is easy for IntelliJ to consume and points it at a specific directory (which we’ll specify when we run the tool). The Working directory field needs to be set to the location of the pylint install, otherwise the output won’t be clickable within the tool window.

Finally, we can use the pylint tool via the right click menu on any Python-containing source directory:

The output is hyperlinked as we would expect:

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.