Add lint.preview (#8002)

This commit is contained in:
Micha Reiser 2023-10-18 10:26:37 +09:00 committed by GitHub
parent fe485d791c
commit 94b4bb0f57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 10 deletions

View file

@ -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