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
  • 7 months ago
  • 1 month ago
  • 11 years ago

Installs

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

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.