Remove deprecated configuration '--show-source` (#9814)

Co-authored-by: Micha Reiser <micha@reiser.io>
Fixes parts of https://github.com/astral-sh/ruff/issues/7650
This commit is contained in:
Tibor Reiss 2024-06-24 10:52:17 +02:00 committed by Micha Reiser
parent a4688aebe9
commit b24e4473c5
10 changed files with 76 additions and 263 deletions

View file

@ -24,7 +24,7 @@ use ruff_linter::rules::{
pycodestyle, pydocstyle, pyflakes, pylint, pyupgrade,
};
use ruff_linter::settings::types::{
IdentifierPattern, PythonVersion, RequiredVersion, SerializationFormat,
IdentifierPattern, OutputFormat, PythonVersion, RequiredVersion,
};
use ruff_linter::{warn_user_once, RuleSelector};
use ruff_macros::{CombineOptions, OptionsMetadata};
@ -86,7 +86,7 @@ pub struct Options {
output-format = "grouped"
"#
)]
pub output_format: Option<SerializationFormat>,
pub output_format: Option<OutputFormat>,
/// Enable fix behavior by-default when running `ruff` (overridden
/// by the `--fix` and `--no-fix` command-line flags).
@ -108,21 +108,6 @@ pub struct Options {
#[option(default = "false", value_type = "bool", example = "fix-only = true")]
pub fix_only: Option<bool>,
/// Whether to show source code snippets when reporting lint violations
/// (overridden by the `--show-source` command-line flag).
#[option(
default = "false",
value_type = "bool",
example = r#"
# By default, always show source code snippets.
show-source = true
"#
)]
#[deprecated(
note = "`show-source` is deprecated and is now part of `output-format` in the form of `full` or `concise` options. Please update your configuration."
)]
pub show_source: Option<bool>,
/// Whether to show an enumeration of all fixed lint violations
/// (overridden by the `--show-fixes` command-line flag).
#[option(