Scroll to navigation

FLAKE8(1) General Commands Manual FLAKE8(1)

NAME

flake8 - code checker using pycodestyle and pyflakes

SYNOPSIS

flake8 [options] input ...

DESCRIPTION

flake8 is a command-line utility for enforcing style consistency across Python projects. By default it includes lint checks provided by the PyFlakes project, PEP-0008 inspired style checks provided by the PyCodeStyle project, and McCabe complexity checking provided by the McCabe project. It will also run third-party extensions if they are found and installed.

OPTIONS

show program's version number and exit
show this help message and exit
print more information about what is happening in flake8. This option is repeatable and will increase verbosity each time it is repeated.
report only file names, or nothing. This option is repeatable.
print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.
report changes only within line number ranges in the unified diff provided on standard in by the user.
comma-separated list of files or directories to exclude. (Default: .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg)
only check for filenames matching the patterns in this comma-separated list. (Default: *.py)
the name used when reporting errors from code passed via stdin. This is useful for editors piping the file contents to flake8. (Default: stdin)
format errors according to the chosen formatter.
hang closing bracket instead of matching indentation of opening bracket's line.
comma-separated list of errors and warnings to ignore (or skip). For example, --ignore=E4,E51,W234. (Default: E121,E123,E126,E226,E24,E704,W503,W504)
maximum allowed line length for the entirety of this run. (Default: 79)
comma-separated list of errors and warnings to enable. For example, --select=E4,E51,W234. (Default: E,F,W,C90)
disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.
show the source generate each error or warning.
count errors and warnings.
enable plugins and extensions that are otherwise disabled by default
exit with status code "0" even if there are errors.
install a hook that is run prior to a commit for the supported version control system.
number of subprocesses to use to run checks in parallel. This is ignored on Windows. The default, "auto", will auto-detect the number of processors available to use. (Default: auto)
redirect report to a file.
write to stdout and output-file.
provide extra config files to parse in addition to the files found by Flake8 by default. These files are the last ones read and so they take the highest precedence when multiple files provide the same option.
path to the config file that will be the authoritative config source. This will cause Flake8 to ignore all other configuration files.
ignore all found configuration files.
print benchmark information about this run of Flake8
McCabe complexity threshold
print information necessary when preparing a bug report
define more built-ins, comma separated
check syntax of the doctests
run doctests only on these files
skip these files when running doctests

CONFIGURATION

The project options are read from the [flake8] section of the tox.ini file or the setup.cfg file located in any parent folder of the path(s) being processed. Allowed options are: exclude, filename, select, ignore, max-line-length, hang-closing, count, format, quiet, showpep8, show-source, statistics, verbose, max-complexity, builtins.

November 2016