Formatter Validator Minifier Escape / Unescape JSON ↔ String JSON ↔ YAML JSON → CSV NDJSON / JSON Lines JSON → Types JSON ↔ XML JSON Diff JSON Patch Canonicalize (RFC 8785) Schema Validator Schema Generator JSONPath Tester JWT Decoder JSON Errors Schemas More Tools
JSONTools / Schema registry / Ruff
Schema registry

Ruff

Ruff, a fast Python linter

ruff.toml.ruff.toml

Check your file against this schema

Opens the validator with this schema already loaded. Paste your ruff.toml and it validates in your browser — nothing is uploaded.

Validate a ruff.toml → View raw schema

Fields

Generated directly from the schema, following local $refs, to two levels of nesting.

Field Type Description
allowed-confusablesdeprecatedarray | nullA list of allowed "confusable" Unicode characters to ignore when enforcing `RUF001`, `RUF002`, and `RUF003`.
analyzeanyOfOptions to configure import map generation.
builtinsarray | nullA list of builtins to treat as defined references, in addition to the system builtins.
cache-dirstring | nullA path to the cache directory. By default, Ruff stores cache results in a `.ruff_cache` directory in the current project root. However, Ruff will also respect the `RUFF_CACHE_DIR` environment variable, which takes precedence over that
dummy-variable-rgxdeprecatedstring | nullA regular expression used to identify "dummy" variables, or those which should be ignored when enforcing (e.g.) unused-variable rules. The default expression matches `_`, `__`, and `_var`, but not `_var_`.
excludearray | nullA list of file patterns to exclude from formatting and linting. Exclusions are based on globs, and can be either: - Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude
explicit-preview-rulesdeprecatedboolean | nullWhether to require exact codes to select preview rules. When enabled, preview rules will not be selected by prefixes — the full code of each preview rule will be required to enable the rule.
extendstring | nullA path to a local `pyproject.toml` or `ruff.toml` file to merge into this configuration. User home directory and environment variables will be expanded. To resolve the current configuration file, Ruff will first load this base
extend-excludearray | nullA list of file patterns to omit from formatting and linting, in addition to those specified by [`exclude`](#exclude). Exclusions are based on globs, and can be either: - Single-path patterns, like `.mypy_cache` (to exclude any directory
extend-fixabledeprecatedarray | nullA list of rule codes or prefixes to consider fixable, in addition to those specified by [`fixable`](#lint_fixable).
extend-ignoredeprecatedarray | nullA list of rule codes or prefixes to ignore, in addition to those specified by `ignore`. This option is deprecated because it is now interchangeable with [`ignore`](#lint_ignore). In earlier versions of Ruff, `ignore` would _replace_ the
extend-includearray | nullA list of file patterns to include when linting, in addition to those specified by [`include`](#include). Inclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension. For
extend-per-file-ignoresdeprecatedobject | nullA list of mappings from file pattern to rule codes or prefixes to exclude, in addition to any rules excluded by [`per-file-ignores`](#lint_per-file-ignores).
extend-safe-fixesdeprecatedarray | nullA list of rule codes or prefixes for which unsafe fixes should be considered safe.
extend-selectdeprecatedarray | nullA list of rule codes or prefixes to enable, in addition to those specified by [`select`](#lint_select). Unlike [`select`](#lint_select), which _replaces_ the default rule set when specified, `extend-select` _adds_ to whatever rules are
extend-unfixabledeprecatedarray | nullA list of rule codes or prefixes to consider non-auto-fixable, in addition to those specified by [`unfixable`](#lint_unfixable).
extend-unsafe-fixesdeprecatedarray | nullA list of rule codes or prefixes for which safe fixes should be considered unsafe.
extensionobject | nullA mapping of custom file extensions to known file types (overridden by the `--extension` command-line flag). Supported file types include `python`, `pyi`, `ipynb`, and `markdown`. Any file extensions listed here will be automatically added
externaldeprecatedarray | nullA list of rule codes or prefixes that are unsupported by Ruff, but should be preserved when (e.g.) validating `# noqa` directives. Useful for retaining `# noqa` directives that cover plugins not yet implemented by Ruff.
fixboolean | nullEnable fix behavior by-default when running `ruff` (overridden by the `--fix` and `--no-fix` command-line flags). Only includes automatic fixes unless `--unsafe-fixes` is provided.
fix-onlyboolean | nullLike [`fix`](#fix), but disables reporting on leftover violation. Implies [`fix`](#fix).
fixabledeprecatedarray | nullA list of rule codes or prefixes to consider fixable. By default, all rules are considered fixable.
flake8-annotationsdeprecatedanyOfOptions for the `flake8-annotations` plugin.
flake8-banditdeprecatedanyOfOptions for the `flake8-bandit` plugin.
flake8-boolean-trapdeprecatedanyOfOptions for the `flake8-boolean-trap` plugin.
flake8-bugbeardeprecatedanyOfOptions for the `flake8-bugbear` plugin.
flake8-builtinsdeprecatedanyOfOptions for the `flake8-builtins` plugin.
flake8-comprehensionsdeprecatedanyOfOptions for the `flake8-comprehensions` plugin.
flake8-copyrightdeprecatedanyOfOptions for the `flake8-copyright` plugin.
flake8-errmsgdeprecatedanyOfOptions for the `flake8-errmsg` plugin.
flake8-gettextdeprecatedanyOfOptions for the `flake8-gettext` plugin.
flake8-implicit-str-concatdeprecatedanyOfOptions for the `flake8-implicit-str-concat` plugin.
flake8-import-conventionsdeprecatedanyOfOptions for the `flake8-import-conventions` plugin.
flake8-pytest-styledeprecatedanyOfOptions for the `flake8-pytest-style` plugin.
flake8-quotesdeprecatedanyOfOptions for the `flake8-quotes` plugin.
flake8-selfdeprecatedanyOfOptions for the `flake8_self` plugin.
flake8-tidy-importsdeprecatedanyOfOptions for the `flake8-tidy-imports` plugin.
flake8-type-checkingdeprecatedanyOfOptions for the `flake8-type-checking` plugin.
flake8-unused-argumentsdeprecatedanyOfOptions for the `flake8-unused-arguments` plugin.
force-excludeboolean | nullWhether to enforce [`exclude`](#exclude) and [`extend-exclude`](#extend-exclude) patterns, even for paths that are passed to Ruff explicitly. Typically, Ruff will lint any paths passed in directly, even if they would typically be excluded
formatanyOfOptions to configure code formatting.
ignoredeprecatedarray | nullA list of rule codes or prefixes to ignore. Prefixes can specify exact rules (like `F841`), entire groups (like `F`), or anything in between. When breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively)
ignore-init-module-importsdeprecatedboolean | nullAvoid automatically removing unused imports in `__init__.py` files. Such imports will still be flagged, but with a dedicated message suggesting that the import is either added to the module's `__all__` symbol, or re-exported with a
includearray | nullA list of file patterns to include when linting. Inclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension. `pyproject.toml`, `ruff.toml`, and `.ruff.toml` are included
indent-widthanyOfThe number of spaces per indentation level (tab). Used by the formatter and when enforcing long-line violations (like `E501`) to determine the visual width of a tab. This option changes the number of spaces the formatter inserts when using
isortdeprecatedanyOfOptions for the `isort` plugin.
line-lengthanyOfThe line length to use when enforcing long-lines violations (like `E501`) and at which `isort` and the formatter prefers to wrap lines. The length is determined by the number of characters per line, except for lines containing East Asian
lintanyOf
logger-objectsdeprecatedarray | nullA list of objects that should be treated equivalently to a `logging.Logger` object. This is useful for ensuring proper diagnostics (e.g., to identify `logging` deprecations and other best-practices) for projects that re-export a
mccabedeprecatedanyOfOptions for the `mccabe` plugin.
namespace-packagesarray | nullMark the specified directories as namespace packages. For the purpose of module resolution, Ruff will treat those directories and all their subdirectories as if they contained an `__init__.py` file.
output-formatanyOfThe style in which violation messages should be formatted: `"full"` (default) (shows source), `"concise"`, `"grouped"` (group messages by file), `"json"` (machine-readable), `"junit"` (machine-readable XML), `"github"` (GitHub Actions
output-prefer-rule-codesboolean | nullWhether to prefer rule codes over human-readable rule names in diagnostic output, even when preview mode is enabled. Diagnostics without rule codes, such as syntax errors and formatting diagnostics, will continue to use the human-readable
pep8-namingdeprecatedanyOfOptions for the `pep8-naming` plugin.
per-file-ignoresdeprecatedobject | nullA list of mappings from file pattern to rule codes or prefixes to exclude, when considering any matching files. An initial '!' negates the file pattern. For more information on the glob syntax, refer to the [`globset`
per-file-target-versionobject | nullA list of mappings from glob-style file pattern to Python version to use when checking the corresponding file(s). This may be useful for overriding the global Python version settings in `target-version` or `requires-python` for a subset of
previewboolean | nullWhether to enable preview mode. When preview mode is enabled, Ruff will use unstable rules, fixes, and formatting.
pycodestyledeprecatedanyOfOptions for the `pycodestyle` plugin.
pydocstyledeprecatedanyOfOptions for the `pydocstyle` plugin.
pyflakesdeprecatedanyOfOptions for the `pyflakes` plugin.
pylintdeprecatedanyOfOptions for the `pylint` plugin.
pyupgradedeprecatedanyOfOptions for the `pyupgrade` plugin.
required-versionanyOfEnforce a requirement on the version of Ruff, to enforce at runtime. If the version of Ruff does not meet the requirement, Ruff will exit with an error. Useful for unifying results across many environments, e.g., with a `pyproject.toml`
respect-gitignoreboolean | nullWhether to automatically exclude files that are ignored by `.ignore`, `.gitignore`, `.git/info/exclude`, and global `gitignore` files. Enabled by default.
selectdeprecatedarray | nullA list of rule codes or prefixes to enable. Prefixes can specify exact rules (like `F841`), entire groups (like `F`), or anything in between. When breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively)
show-fixesboolean | nullWhether to show an enumeration of all fixed lint violations (overridden by the `--show-fixes` command-line flag).
srcarray | nullThe directories to consider when resolving first- vs. third-party imports. When omitted, the `src` directory will typically default to including both: 1. The directory containing the nearest `pyproject.toml`, `ruff.toml`, or `.ruff.toml`
target-versionanyOfThe minimum Python version to target, e.g., when considering automatic code upgrades, like rewriting type annotations. Ruff will not propose changes using features that are not available in the given version. For example, to represent
task-tagsdeprecatedarray | nullA list of task tags to recognize (e.g., "TODO", "FIXME", "XXX"). Comments starting with these tags will be ignored by commented-out code detection (`ERA`), and skipped by line-length rules (`E501`) if
typing-modulesdeprecatedarray | nullA list of modules whose exports should be treated equivalently to members of the `typing` module. This is useful for ensuring proper type annotation inference for projects that re-export `typing` and `typing_extensions` members from a
unfixabledeprecatedarray | nullA list of rule codes or prefixes to consider non-fixable.
unsafe-fixesboolean | nullEnable application of unsafe fixes. If excluded, a hint will be displayed when unsafe fixes are available. If set to false, the hint will be hidden.

What we found in this schema

Specification sections for the keywords in this schema

Keyword Document Section
$refJSON Schema Core, draft 2020-12§8.2.3.1 — Direct References with "$ref"
additionalPropertiesJSON Schema Core, draft 2020-12§10.3.2.3 — "additionalProperties"
anyOfJSON Schema Core, draft 2020-12§10.2.1.2 — "anyOf"
constJSON Schema Validation, draft 2020-12§6.1.3 — "const"
deprecatedJSON Schema Validation, draft 2020-12§9.3 — "deprecated"
descriptionJSON Schema Validation, draft 2020-12§9.1 — "title" and "description"
enumJSON Schema Validation, draft 2020-12§6.1.2 — "enum"
formatJSON Schema Validation, draft 2020-12§7 — Vocabularies for Semantic Content With "format"
itemsJSON Schema Core, draft 2020-12§10.3.1.2 — "items"
maximumJSON Schema Validation, draft 2020-12§6.2.2 — "maximum"
minimumJSON Schema Validation, draft 2020-12§6.2.4 — "minimum"
oneOfJSON Schema Core, draft 2020-12§10.2.1.3 — "oneOf"
propertiesJSON Schema Core, draft 2020-12§10.3.2.1 — "properties"
typeJSON Schema Validation, draft 2020-12§6.1.1 — "type"

Documents

Attribution

This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.

← All schemas