mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 15:15:33 +00:00
Add --line-length
option to format
command (#8363)
Restores the `--line-length` option removed in https://github.com/astral-sh/ruff/pull/8131 Closes #8362 Closes #8352
This commit is contained in:
parent
edc75dc5d6
commit
3a889f4686
3 changed files with 11 additions and 3 deletions
|
@ -409,6 +409,9 @@ pub struct FormatCommand {
|
|||
force_exclude: bool,
|
||||
#[clap(long, overrides_with("force_exclude"), hide = true)]
|
||||
no_force_exclude: bool,
|
||||
/// Set the line-length.
|
||||
#[arg(long, help_heading = "Format configuration")]
|
||||
pub line_length: Option<LineLength>,
|
||||
/// Ignore all configuration files.
|
||||
#[arg(long, conflicts_with = "config", help_heading = "Miscellaneous")]
|
||||
pub isolated: bool,
|
||||
|
@ -552,6 +555,7 @@ impl FormatCommand {
|
|||
stdin_filename: self.stdin_filename,
|
||||
},
|
||||
CliOverrides {
|
||||
line_length: self.line_length,
|
||||
respect_gitignore: resolve_bool_arg(
|
||||
self.respect_gitignore,
|
||||
self.no_respect_gitignore,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue