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.7
  • github.​com
  • github.​com
  • 5 months ago
  • 15 minutes ago
  • 11 years ago

Installs

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

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.