mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
Rename tab-size
to indent-width
(#8082)
## Summary This PR renames the `tab-size` configuration option to `indent-width` to express that the formatter uses the option to determine the indentation width AND as tab width. I first preferred naming the option `tab-width` but then decided to go with `indent-width` because: * It aligns with the `indent-style` option * It would allow us to write a lint rule that asserts that each indentation uses `indent-width` spaces. Closes #7643 ## Test Plan Added integration test
This commit is contained in:
parent
c3dabc1933
commit
84979f9673
10 changed files with 143 additions and 49 deletions
|
@ -6,7 +6,7 @@ use wasm_bindgen::prelude::*;
|
|||
|
||||
use ruff_formatter::{FormatResult, Formatted, IndentStyle};
|
||||
use ruff_linter::directives;
|
||||
use ruff_linter::line_width::{LineLength, TabSize};
|
||||
use ruff_linter::line_width::{IndentWidth, LineLength};
|
||||
use ruff_linter::linter::{check_path, LinterResult};
|
||||
use ruff_linter::registry::AsRule;
|
||||
use ruff_linter::settings::types::PythonVersion;
|
||||
|
@ -126,7 +126,7 @@ impl Workspace {
|
|||
|
||||
line_length: Some(LineLength::default()),
|
||||
|
||||
tab_size: Some(TabSize::default()),
|
||||
indent_width: Some(IndentWidth::default()),
|
||||
target_version: Some(PythonVersion::default()),
|
||||
|
||||
lint: Some(LintOptions {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue