mirror of https://github.com/astral-sh/ruff
Document the way extend-ignore/select are applied (#1839)
Closes: https://github.com/charliermarsh/ruff/issues/1838
This commit is contained in:
parent
9aeb5df5fe
commit
ef17c82998
12
README.md
12
README.md
|
|
@ -1908,6 +1908,12 @@ extend-exclude = ["tests", "src/bad.py"]
|
|||
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`.
|
||||
|
||||
**Default value**: `[]`
|
||||
|
||||
**Type**: `Vec<RuleCodePrefix>`
|
||||
|
|
@ -1927,6 +1933,12 @@ extend-ignore = ["F841"]
|
|||
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`.
|
||||
|
||||
**Default value**: `[]`
|
||||
|
||||
**Type**: `Vec<RuleCodePrefix>`
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
}
|
||||
},
|
||||
"extend-ignore": {
|
||||
"description": "A list of rule codes or prefixes to ignore, in addition to those specified by `ignore`.",
|
||||
"description": "A list of rule codes or prefixes to ignore, in addition to those specified by `ignore`.\n\nNote 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`.",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
}
|
||||
},
|
||||
"extend-select": {
|
||||
"description": "A list of rule codes or prefixes to enable, in addition to those specified by `select`.",
|
||||
"description": "A list of rule codes or prefixes to enable, in addition to those specified by `select`.\n\nNote 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`.",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
|
|
|
|||
|
|
@ -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 = "[]",
|
||||
|
|
|
|||
Loading…
Reference in New Issue