Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PyCharm 3.x Flake8 Configuration XML
<toolSet name="Code Checking">
<tool name="Flake8" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="true" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="/usr/local/bin/flake8" />
<option name="PARAMETERS" value="--max-complexity 10 $FilePath$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
<filter>
<option name="NAME" value="Filter 1" />
<option name="DESCRIPTION" />
<option name="REGEXP" value="$FILE_PATH$\:$LINE$\:$COLUMN$\:.*" />
</filter>
<filter>
<option name="NAME" value="Filter 2" />
<option name="DESCRIPTION" />
<option name="REGEXP" value="$FILE_PATH$\:$LINE$\:.*" />
</filter>
</tool>
</toolSet>
@jsmits

This comment has been minimized.

Copy link
Owner Author

jsmits commented Feb 16, 2014

Mac OS X:

  • drop this in ~/Library/Preferences/PyCharm30/tools
  • flake8 path most likely: /usr/local/share/python/flake8

Ubuntu:

  • drop this in ~/.PyCharm30/config/tools
@jsmits

This comment has been minimized.

Copy link
Owner Author

jsmits commented Aug 5, 2014

Add --max-complexity 10 for McCabe plugin. Please make sure mccabe is installed.

@tarvitz

This comment has been minimized.

Copy link

tarvitz commented Mar 9, 2015

Pycharm 4.x works as well as 3.x

Windows 7+:

  • $USER_HOME$/code/ve/Scripts/flake8

where $USER_HOME$ is home folder for user, for example C:/Users/Tarvitz

@kennethlove

This comment has been minimized.

Copy link

kennethlove commented Feb 8, 2016

Seems to be working in PyCharm 5.x, too.

@jsmits

This comment has been minimized.

Copy link
Owner Author

jsmits commented Dec 1, 2016

Seems to be working in PyCharm 2016.* too.

@ssbarnea

This comment has been minimized.

Copy link

ssbarnea commented Jan 12, 2017

On MacOS using latest PyCharm PRO 2016.3.2, flake8 is executed but the filters are not working, the console output does not have any clickable links on it, really annoying. I am wondering what am I missing.

@oxydedefer

This comment has been minimized.

Copy link

oxydedefer commented Feb 18, 2017

@ssbarnea you must to add a output filter containing the regular expression $FILE_PATH$\:$LINE$\:$COLUMN$\:.* working in pycharm CE 2016.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.