ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Sublime​Linter-flake​8

by SublimeLinter ST3

SublimeLinter plugin for python, using flake8.

Details

Installs

  • Total 123K
  • Win 51K
  • Mac 40K
  • Linux 32K
Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6
Windows 0 6 2 6 2 4 6 8 4 2 5 8 5 1 2 4 6 2 2 3 5 3 0 4 9 4 6 2 2 11 3 7 4 4 1 0 9 6 9 8 3 2 2 3 2 10
Mac 0 2 2 9 2 7 2 1 3 3 3 4 1 6 1 2 3 3 6 2 3 7 3 3 8 9 2 3 0 11 6 2 2 5 1 4 7 5 5 3 5 4 4 4 6 6
Linux 0 2 3 1 4 6 2 5 4 1 4 4 2 6 4 3 5 4 1 5 1 4 2 7 5 2 5 3 2 14 5 7 4 14 2 2 2 5 3 3 5 2 2 3 8 3

Readme

Source
raw.​githubusercontent.​com

SublimeLinter-flake8

Build Status

This linter plugin for SublimeLinter provides an interface to flake8.

Installation

SublimeLinter must be installed in order to use this plugin.

Install via Package Control or git clone as usual.

Ensure that a flake8 is actually installed somewhere on your system. Typically, pip install flake8 on the command line will do that.

If you want to use a globally installed flake, make sure that it is available on the PATH. Before going any further, please read and follow the steps in “Finding a linter executable” through “Validating your PATH” in the documentation.

Otherwise configure “executable” or the “python” setting.

If you use pipenv, and you're working on a project with a Pipfile, everything should be automatic.

Settings

Additional settings:

  • ignore_fixables (default: True): filter warnings that Sublime can fix automatically (e.g. trailing white-space) on save.

SublimeLinter-flake8 works with common flake8 configuration files and inline overrides. Note that by default the working dir is set to an open folder attached to the current window of Sublime. Edit this setting if your config files are located in a subfolder, for example.

Use “args” if you want to pass additional command line arguments to flake8.

Compatibility with --per-file-ignores and other flake8 plugins

SublimeLinter-flake8 is compatible with most flake8 plugins out of the box. However, plugins that rely on selecting or ignoring certain files based on filename may appear to be “broken” due to the way SublimeLinter runs during linting. This includes flake8's own --per-file-ignores option introduced in 3.7.0, as well as plugins such as flake8-aaa and flake8-pyi.

To make the source filename available to the flake8 executable again, pass the --stdin-display-name option using SublimeLinter's “args” setting:

"args": ["--stdin-display-name", "${file:stdin}"]

Including the :stdin fallback ensures that files that have yet to be saved are still linted.