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
  • 1 week ago
  • 2 hours ago
  • 11 years ago

Installs

  • Total 125K
  • Win 52K
  • Mac 40K
  • Linux 32K
Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27
Windows 2 5 6 6 1 2 9 4 8 6 4 8 7 6 4 3 5 4 4 8 6 7 6 0 2 8 1 9 5 9 3 3 4 9 5 5 6 7 1 3 3 4 2 7 1 1
Mac 0 4 3 3 10 1 5 10 3 0 2 4 5 5 2 2 4 0 3 2 4 5 0 2 1 1 2 3 2 2 7 2 5 4 4 5 6 0 0 5 4 3 6 4 3 1
Linux 0 5 3 4 2 4 6 8 5 2 2 3 3 4 2 1 1 3 2 5 2 6 5 2 1 2 4 8 4 2 3 1 2 1 4 2 3 0 0 3 3 1 4 4 2 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.