id = "flake8"
name = "Flake8"
homepage = "https://github.com/pycqa/flake8"
description = "A Python style guide enforcement tool."
executables = ["flake8"]
[dotfiles]
paths = ["[configHome]/flake8", "~/.flake8"]
exclude = []
secret = []
side_effect = false
[commands]
format = 1
label = "Check Python style"
description = "Lint Python files or directories with flake8 and choose which error codes to report. Plugin-specific options, formatters beyond a name and per-file ignores are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = false, short_bundles = false }
[[commands.source]]
id = "help"
kind = "help"
revision = "flake8 7.x (flake8 --help)"
evidence = """
usage: flake8 [options] file file ...
-v, --verbose Print more information about what is happening in flake8.
--output-file OUTPUT_FILE Redirect report to a file.
--config CONFIG Path to the config file that will be the authoritative config source.
--isolated Ignore all configuration files.
-q, --quiet Report only file names, or nothing. This option is repeatable.
--color {auto,always,never} Whether to use color in output. Defaults to `auto`.
--count Print total number of errors to standard output after all other output.
--exclude patterns Comma-separated list of files or directories to exclude.
--extend-exclude patterns Comma-separated list of files or directories to add to the list of excluded ones.
--ignore errors Comma-separated list of error codes to ignore (or skip).
--extend-ignore errors Comma-separated list of error codes to add to the list of ignored ones.
--max-line-length n Maximum allowed line length for the entirety of this run. (Default: 79)
--select errors Limit the reported error codes to codes prefix-matched by this list.
--show-source Show the source generate each error or warning.
--statistics Count errors.
--exit-zero Exit with status code "0" even if there are errors.
-j, --jobs JOBS Number of subprocesses to use to run checks in parallel.
--max-complexity MAX_COMPLEXITY McCabe complexity threshold
"""
[[commands.field]]
id = "paths"
label = "Files or directories"
description = "Python files or directories to check. Defaults to the current directory when empty."
type = "path"
path = { kind = "any", role = "input" }
position = 0
multiple = true
sources = ["help"]
[[commands.field]]
id = "select"
label = "Only report codes"
description = "Comma-separated error code prefixes, e.g. E4,E51,W234."
type = "string"
option = ["--select"]
sources = ["help"]
[[commands.field]]
id = "ignore"
label = "Ignore codes"
description = "Comma-separated codes. Replaces flake8's default ignore list."
type = "string"
option = ["--ignore"]
sources = ["help"]
[[commands.field]]
id = "extend_ignore"
label = "Also ignore codes"
description = "Comma-separated codes added to the default ignore list."
type = "string"
option = ["--extend-ignore"]
sources = ["help"]
[[commands.field]]
id = "exclude"
label = "Exclude patterns"
description = "Comma-separated files or directories. Replaces the default exclude list."
type = "string"
option = ["--exclude"]
sources = ["help"]
[[commands.field]]
id = "extend_exclude"
label = "Also exclude"
description = "Comma-separated files or directories added to the default exclude list."
type = "string"
option = ["--extend-exclude"]
sources = ["help"]
[[commands.field]]
id = "max_line_length"
label = "Max line length"
type = "integer"
option = ["--max-line-length"]
observed_default = "79"
sources = ["help"]
[[commands.field]]
id = "max_complexity"
label = "Max McCabe complexity"
type = "integer"
option = ["--max-complexity"]
sources = ["help"]
[[commands.field]]
id = "show_source"
label = "Show source lines"
type = "boolean"
option = ["--show-source"]
sources = ["help"]
[[commands.field]]
id = "statistics"
label = "Show statistics"
type = "boolean"
option = ["--statistics"]
sources = ["help"]
[[commands.field]]
id = "count"
label = "Print error count"
type = "boolean"
option = ["--count"]
sources = ["help"]
[[commands.field]]
id = "exit_zero"
label = "Always exit 0"
type = "boolean"
option = ["--exit-zero"]
sources = ["help"]
[[commands.field]]
id = "config"
label = "Config file"
description = "Use only this config file and ignore all others."
type = "path"
option = ["--config"]
path = { kind = "file", role = "input" }
sources = ["help"]
[[commands.field]]
id = "output_file"
label = "Report file"
type = "path"
option = ["--output-file"]
path = { kind = "file", role = "output", must_exist = false }
effect = "overwrite"
sources = ["help"]
[[commands.task]]
id = "check"
label = "Check files"
fields = ["paths", "max_line_length", "show_source"]
required = ["paths"]
[[commands.task]]
id = "summary"
label = "Summarise problems"
fields = ["paths", "statistics", "count"]
required = ["paths"]
set = { statistics = [true], count = [true] }
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["paths", "select", "ignore", "extend_ignore", "max_line_length", "show_source", "statistics", "count"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["exclude", "extend_exclude", "max_complexity", "exit_zero", "config", "output_file"]