To use this plugin
flake8 will need to be installed on your
system. If it is not already installed, you can install
flake8 by typing the following in a
pip install flake8
You can then install this package from with Atom or by typing:
apm install linter-flake8
Note: If the
linter package is not currently installed, it will be installed
Built-in docstrings check (Optional)
To include built-in docstrings (pep257) support you will also need to install:
pip install flake8-docstrings
OpenStack Style Guidelines check (Optional)
pip install hacking
flake8 targets the proper Python version for each project you work
on, it is highly recommended to install
flake8 in each project's
If you are okay with installing
flake8inside each virtualenv, just do that.
If you'd rather use the system-wide
flake8-python2), create a
flake8symlink in each virtualenv pointing to your desired flake8 version. For example:
ln -s /usr/bin/flake8-python2 ~/.virtualenvs/random_python2_project/bin/flake8
Then activate your virtualenv from the command line before starting Atom, and you're good to go!
You can configure linter-flake8 like any Atom package by editing the settings in Atom -> Preferences -> Packages -> linter-flake8.
Or if you prefer you can use Atom config.cson file ~/.atom/config.cson (click Open Your Config in Atom menu).
If you installed
flake8 in a location not in your
$PATH, the Settings panel
will let you specify where it lives. For example:
'linter-flake8': 'executablePath': '/usr/bin/flake8'
executablePath setting may use
$PROJECT_NAME for the path or name of the current project, respectively.
Project configuration files
Linter also supports reading
flake8 configuration files. To use them, you
need specify their names manually into Config Files Names in the package
settings. Note that package settings from Settings panel will be ignored if
a configuration file was found.