Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>cornflakes-linterNew to Visual Studio Code? Get it now.
cornflakes-linter

cornflakes-linter

kevinglasson

|
110,037 installs
| (3) | Free
Wrapper for Python flake8 linter and associated plugins. It rectifies current issues with displaying ALL flake8 problems in the problems tab.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Readme

"cornflakes-linter" is a wrapper for flake8.

** added onType linting (0.5) **

vscode currently already has flake8 integration HOWEVER it doesn't play nicely with flake8 plugins in that the regex can't parse the output correctly. This means that the errors/warnings/information do not show up in the problems tab. This extension rectifies that.

Quick Start.

  1. Make sure you have installed flake8 somewhere..
  2. Set the path to the flake8 in Settings.json (or search in the vscode settings tab).
{
	"cornflakes.linter.executablePath": "path/to/venvs/myvenv/bin/flake8"
}
  1. Open a .py file and then save it and the extension will run showing all of the lint issues in the problems tab.

Configuration

For the extension

You need to include the full path to the flake8 executable that you wish to use.

To find the path to the appropriate flake8 you can (on *nix) do. I'm sure you can do something similar on Windows too.

which flake8

The set it in Settings.json

{
	"cornflakes.linter.executablePath": "path/to/venvs/myvenv/bin/flake8"
}

Change when the linter is run

There are a couple of options here so that you can decide when to re-lint the current file. You can choose either on save or on type! Again all settings are available through the settings page, or the json.

{
	"cornflakes.linter.run": "onType"
}

Flake8 configuration

The way to configure flake8 extensions / settings / ignores and all other configuration for flake8 is by using the standard flake8 configuration rules. The extension will be run from the root directory of the workspace.

Personally I like a tox.ini in the workspace root.

[flake8]
ignore = E226,E302,E41
max-line-length = 88
exclude = tests/*
max-complexity = 10

Acknowledgements

And is virtually a direct copy of ruby-linter.

The extension architecture is based off of the PHPValidationProvider from the built-in php extension.

Attributions

Icons made by Smashicons from www.flaticon.com is licensed by CC 3.0 BY
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft