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

Sublime​Linter-flake​8

by SublimeLinter ST3 Trending

SublimeLinter plugin for python, using flake8.

Details

  • 4.2.8
    4.2.7
  • github.​com
  • github.​com
  • 9 months ago
  • 3 hours ago
  • 11 years ago

Installs

  • Total 127K
  • Win 53K
  • Mac 41K
  • Linux 33K
Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27
Windows 12 8 7 5 2 6 6 5 8 6 3 6 11 6 6 6 5 5 6 6 7 10 1 1 1 0 0 6 5 4 1 4 1 1 8 3 1 3 2 4 2 3 6 10 6 7
Mac 4 4 4 1 0 1 2 3 5 6 0 2 5 3 4 2 3 2 5 3 7 1 0 3 1 0 2 3 1 3 2 2 3 1 2 3 2 6 1 4 3 2 1 1 7 5
Linux 8 5 4 4 4 4 5 2 2 0 0 3 3 3 2 2 4 6 3 1 2 4 1 1 3 1 2 2 7 3 2 1 1 5 9 5 5 3 2 3 3 2 2 1 3 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.