mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 22:10:48 -05:00
Document the way extend-ignore/select are applied (#1839)
Closes: https://github.com/charliermarsh/ruff/issues/1838
This commit is contained in:
@@ -143,6 +143,12 @@ pub struct Options {
|
||||
)]
|
||||
/// A list of rule codes or prefixes to ignore, in addition to those
|
||||
/// specified by `ignore`.
|
||||
///
|
||||
/// Note that `extend-ignore` is applied after resolving rules from
|
||||
/// `ignore`/`select` and a less specific rule in `extend-ignore`
|
||||
/// would overwrite a more specific rule in `select`. It is
|
||||
/// recommended to only use `extend-ignore` when extending a
|
||||
/// `pyproject.toml` file via `extend`.
|
||||
pub extend_ignore: Option<Vec<RuleCodePrefix>>,
|
||||
#[option(
|
||||
default = "[]",
|
||||
@@ -154,6 +160,12 @@ pub struct Options {
|
||||
)]
|
||||
/// A list of rule codes or prefixes to enable, in addition to those
|
||||
/// specified by `select`.
|
||||
///
|
||||
/// Note that `extend-select` is applied after resolving rules from
|
||||
/// `ignore`/`select` and a less specific rule in `extend-select`
|
||||
/// would overwrite a more specific rule in `ignore`. It is
|
||||
/// recommended to only use `extend-select` when extending a
|
||||
/// `pyproject.toml` file via `extend`.
|
||||
pub extend_select: Option<Vec<RuleCodePrefix>>,
|
||||
#[option(
|
||||
default = "[]",
|
||||
|
||||
Reference in New Issue
Block a user