How I integrated PyLint into my PyCharm workflow.

Bruce Krayenhoff
Jan 22, 2018 · 2 min read

PyCharm has it’s own built-in linting, which is already useful and nicely integrated. However, it misses much that PyLint catches.

In this post I explain how I integrate PyLint into PyCharm as an external tool, with links from the PyLint results back to the python file.

Setting up PyLint as an External Tool in PyCharm

  1. Install PyLint and create a .pylintrc file (Reference: The docs).
  2. Setup PyCharm to run PyLint as an external tool (Reference: Stack Overflow)
  3. Edit the .pylintrc file to configure PyLint to print the full file path and line number as shown (The docs)

4. Configure PyCharm output filters to: .*$FILE_PATH$\:$LINE$\:.*

Then it will recognize filename:line_number as a link

Output Filter configuration is shown at the bottom of this picture:

5. Run your external tool and check that it works as expected, including the links:

Additional Touches

  • Create several levels of PyLinting:

I generally lint for Errors and Warn/Refactor often, and only lint for Convention after the changes to a python file (that I’ll keep using) are several days old (and hence more stable).

  • The Grep console plugin can add some nice highlighting
  • I often work from the bottom PyLint link up, so that the earlier links still point to the correct lines.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store