mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 13:51:37 +00:00
Add lint.preview
(#8002)
This commit is contained in:
parent
fe485d791c
commit
94b4bb0f57
4 changed files with 35 additions and 10 deletions
|
@ -141,7 +141,7 @@ pub struct Options {
|
|||
pub required_version: Option<Version>,
|
||||
|
||||
/// Whether to enable preview mode. When preview mode is enabled, Ruff will
|
||||
/// use unstable rules and fixes.
|
||||
/// use unstable rules, fixes, and formatting.
|
||||
#[option(
|
||||
default = "false",
|
||||
value_type = "bool",
|
||||
|
@ -412,6 +412,18 @@ pub struct LintOptions {
|
|||
"#
|
||||
)]
|
||||
pub exclude: Option<Vec<String>>,
|
||||
|
||||
/// Whether to enable preview mode. When preview mode is enabled, Ruff will
|
||||
/// use unstable rules and fixes.
|
||||
#[option(
|
||||
default = "false",
|
||||
value_type = "bool",
|
||||
example = r#"
|
||||
# Enable preview features.
|
||||
preview = true
|
||||
"#
|
||||
)]
|
||||
pub preview: Option<bool>,
|
||||
}
|
||||
|
||||
// Note: This struct should be inlined into [`LintOptions`] once support for the top-level lint settings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue