mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:55:08 +00:00
Introduce tab-size
to correcly calculate the line length with tabulations (#4167)
This commit is contained in:
parent
3644695bf2
commit
c6a760e298
45 changed files with 1005 additions and 173 deletions
|
@ -5,6 +5,7 @@ use clap::{command, Parser};
|
|||
use regex::Regex;
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
use ruff::line_width::LineLength;
|
||||
use ruff::logging::LogLevel;
|
||||
use ruff::registry::Rule;
|
||||
use ruff::resolver::ConfigProcessor;
|
||||
|
@ -545,7 +546,7 @@ impl ConfigProcessor for &Overrides {
|
|||
config.force_exclude = Some(*force_exclude);
|
||||
}
|
||||
if let Some(line_length) = &self.line_length {
|
||||
config.line_length = Some(*line_length);
|
||||
config.line_length = Some(LineLength::from(*line_length));
|
||||
}
|
||||
if let Some(per_file_ignores) = &self.per_file_ignores {
|
||||
config.per_file_ignores = Some(collect_per_file_ignores(per_file_ignores.clone()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue